:root {
    --bg-dark: #0a0a0c;
    --bg-surface: #131316;
    --bg-surface-elevated: #1c1c21;
    --text-main: #f8f9fa;
    --text-muted: #9ca3af;
    --accent-primary: #4FD1C5;
    --accent-secondary: #8B5CF6;
    --success: #34d399;
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-primary: rgba(79, 209, 197, 0.2);
    --glow-secondary: rgba(139, 92, 246, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -2;
    pointer-events: none;
    mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%);
}

/* Background Gradients */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 10s ease-in-out infinite alternate;
}

.glow-bg-2 {
    background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%);
    top: 20%;
    right: -200px;
    left: auto;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(50px) scale(1.1); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 10, 12, 0.7);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

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

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

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

/* Buttons */
.btn-primary {
    display: inline-block;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--accent-primary), #3b82f6);
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.4);
}

.btn-secondary {
    display: inline-block;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    color: var(--text-main) !important;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 8rem auto 4rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(79, 209, 197, 0.1);
    border: 1px solid rgba(79, 209, 197, 0.3);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .story-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .story-section.reverse .story-container {
        direction: ltr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .horizontal-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .horizontal-features {
        grid-template-columns: 1fr;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-ctas {
        flex-direction: column;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .docs-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(
        to right, 
        var(--accent-primary), 
        var(--accent-secondary), 
        var(--accent-primary)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShine 4s linear infinite;
}

@keyframes gradientShine {
    to { background-position: 200% center; }
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-ctas {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cli-copy {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}

.cli-copy:hover {
    border-color: var(--accent-primary);
    background: var(--bg-surface-elevated);
}

.cli-copy .prompt {
    color: var(--text-muted);
}

.cli-copy code {
    font-family: 'Fira Code', monospace;
}

.cli-copy .copy-icon, .copy-icon-cta {
    color: var(--text-muted);
    margin-left: 1rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.cli-copy:hover .copy-icon {
    color: var(--text-main);
}

/* Terminal Visual */
.terminal-window {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.05) inset;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.terminal-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.terminal-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-body {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
}

.line { margin-bottom: 0.4rem; }
.line .prompt { color: var(--accent-primary); margin-right: 0.5rem; }
.line.dim { color: var(--text-muted); }
.line.success { color: var(--success); font-weight: 500; }
.line.info { color: var(--text-muted); }
.line.info a { color: var(--accent-primary); text-decoration: none; }
.line.info a:hover { text-decoration: underline; }

/* Ephemeral Banner */
.ephemeral-banner {
    max-width: 1000px;
    margin: 0 auto 6rem;
    padding: 0 2rem;
}

.ephemeral-content {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(79, 209, 197, 0.05));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.05),
                0 0 60px rgba(139, 92, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.ephemeral-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, transparent 0%, rgba(139, 92, 246, 0.1) 25%, transparent 50%);
    animation: rotateGlow 10s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateGlow {
    100% { transform: rotate(360deg); }
}

.ephemeral-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.ephemeral-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.ephemeral-code {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    background: #000;
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

/* Storytelling Sections */
.story-section {
    padding: 8rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.story-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.story-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.story-section.reverse .story-container {
    direction: rtl;
}

.story-section.reverse .story-text, 
.story-section.reverse .story-visual {
    direction: ltr;
}

.story-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.story-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.story-visual {
    position: relative;
}

.red-border { border: 1px solid rgba(255, 95, 86, 0.2); box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 30px rgba(255, 95, 86, 0.05); }
.green-border { border: 1px solid rgba(39, 201, 63, 0.2); box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 30px rgba(39, 201, 63, 0.05); }
.blue-border { border: 1px solid rgba(59, 130, 246, 0.2); box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 30px rgba(59, 130, 246, 0.05); }

.prompt.red-prompt { color: #ff5f56; }
.prompt.green-prompt { color: #27c93f; }

/* Section Headers */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Pricing Section */
.pricing-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

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

.horizontal-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 2rem;
    padding: 2.5rem 3rem;
}

.horizontal-info {
    flex: 1;
    min-width: 250px;
}

.horizontal-info .price {
    margin-bottom: 0;
}

.horizontal-info .plan-desc {
    margin-bottom: 1rem;
    min-height: auto;
}

.horizontal-features {
    flex: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

.horizontal-features li {
    margin-bottom: 0;
}

.horizontal-action {
    flex: 0.8;
    min-width: 180px;
}

.pricing-card {
    background: rgba(28, 28, 33, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: left;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(79, 209, 197, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.pricing-card.popular {
    background: linear-gradient(145deg, rgba(28, 28, 33, 0.8), rgba(139, 92, 246, 0.1));
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.pricing-card.popular:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 50px rgba(139, 92, 246, 0.2);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.pricing-card .price {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
}

.pricing-card .price span {
    font-size: 1.5rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.pricing-card .price .period {
    font-size: 1.1rem;
    margin-top: 1.8rem;
    margin-left: 0.2rem;
    font-weight: 500;
}

.plan-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    min-height: 44px;
}

.plan-features {
    list-style: none;
    margin-bottom: 3rem;
    flex-grow: 1;
}

.plan-features li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.btn-full {
    width: 100%;
}

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

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.2rem;
}

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

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

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

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Docs Section */
.docs {
    max-width: 1000px;
    margin: 8rem auto;
    padding: 0 2rem;
}

.docs-header {
    text-align: center;
    margin-bottom: 4rem;
}

.docs-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.doc-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.doc-tab:hover {
    background: rgba(255,255,255,0.02);
    color: var(--text-main);
}

.doc-tab.active {
    background: rgba(79, 209, 197, 0.1);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.docs-content {
    padding: 3rem 3rem 3rem 1rem;
}

.doc-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.doc-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.doc-pane h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.doc-pane p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.code-block {
    background: #040404;
    border: 1px solid var(--border-color);
    padding: 3rem 1.25rem 1.25rem 1.25rem;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.8;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
    z-index: 2;
}

.code-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 0 0;
    pointer-events: none;
    z-index: 1;
}

.code-block .prompt {
    color: var(--accent-primary);
    margin-right: 0.5rem;
    user-select: none;
}

/* Architecture Section */
.architecture {
    max-width: 1000px;
    margin: 8rem auto;
    padding: 0 2rem;
    text-align: center;
}

.arch-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    position: relative;
}

.arch-step {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s, border-color 0.3s;
}

.arch-step:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), #3b82f6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.4);
}

.arch-step h4 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.arch-step p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.arch-divider {
    height: 2px;
    width: 120px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    flex-shrink: 0;
    opacity: 0.5;
}

/* Bottom CTA */
.bottom-cta {
    max-width: 1000px;
    margin: 8rem auto;
    padding: 0 2rem;
}

.cta-card {
    background: linear-gradient(145deg, var(--bg-surface-elevated), var(--bg-surface));
    border: 1px solid rgba(79, 209, 197, 0.3);
    border-radius: 24px;
    padding: 5rem 3rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 100px rgba(79, 209, 197, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 60%);
    pointer-events: none;
}

.cta-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.cta-copy {
    background: rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }
    
    .hero-ctas {
        justify-content: center;
        flex-direction: column;
    }

    .terminal-window {
        transform: none;
    }

    .terminal-window:hover {
        transform: none;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 3rem;
    }
}
