/* CSS Variables */
:root {
    /* Electric Orange palette - matches Velocity CLI */
    --color-accent: #FF5F1F;
    --color-accent-dark: #E54E10;
    --color-accent-light: #FF7A40;

    /* Complementary colors */
    --color-secondary: #1E3A5F;
    --color-secondary-light: #2D5A8A;

    /* Neutrals */
    --color-dark: #1a1a2e;
    --color-dark-alt: #16213e;
    --color-gray: #6b7280;
    --color-gray-light: #9ca3af;
    --color-light: #f3f4f6;
    --color-white: #ffffff;

    /* Terminal */
    --color-terminal-bg: #0f0f17;
    --color-terminal-text: #e5e7eb;

    /* Status colors */
    --color-success: #27C93F;
    --color-error: #EF4444;
    --color-warning: #F59E0B;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(255, 95, 31, 0.3);
    --transition: all 0.3s ease;

    --container-width: 1200px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-white);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: transparent;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--color-white);
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-img {
    width: 32px;
    height: 32px;
}

/* Header logo: show white by default, color when scrolled */
.header .logo-white {
    display: block;
}

.header .logo-color {
    display: none;
}

.header.scrolled .logo-white {
    display: none;
}

.header.scrolled .logo-color {
    display: block;
}

.logo-text {
    color: var(--color-white);
    transition: var(--transition);
}

.header.scrolled .logo-text {
    color: var(--color-dark);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: var(--transition);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

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

.nav a.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.header.scrolled .nav a {
    color: var(--color-dark);
}

.header.scrolled .nav a:hover {
    color: var(--color-accent);
}

.header.scrolled .nav a.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition);
}

.header.scrolled .mobile-menu-toggle span {
    background: var(--color-dark);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--header-height) + 40px) 24px 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 50%, var(--color-secondary) 100%);
    z-index: -1;
}

/* Optional: Add hero-bg.jpg to /assets/images/ to enable background image */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    color: var(--color-white);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 .highlight {
    color: var(--color-accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline-light {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: var(--color-white);
    color: var(--color-dark);
}

/* Terminal */
.terminal {
    background: var(--color-terminal-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #2d2d2d;
    gap: 12px;
}

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

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

.terminal-dot.red { background: var(--color-error); }
.terminal-dot.yellow { background: var(--color-warning); }
.terminal-dot.green { background: var(--color-success); }

.terminal-title {
    color: #888;
    font-size: 0.875rem;
    font-family: var(--font-mono);
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
}

.terminal-line {
    color: var(--color-terminal-text);
}

.terminal-line .prompt {
    color: var(--color-accent);
    margin-right: 8px;
}

.terminal-line.output {
    color: #888;
    padding-left: 20px;
}

.terminal-line.output.success {
    color: var(--color-success);
}

.terminal-line.output.url {
    color: var(--color-accent);
}

.hero-terminal {
    max-width: 700px;
    margin: 0 auto;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    background: rgba(255, 95, 31, 0.1);
    color: var(--color-accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-dark);
    line-height: 1.2;
}

.section-header p {
    color: var(--color-gray);
    font-size: 1.125rem;
    line-height: 1.5;
    margin-top: 0;
}

/* Features Section */
.features {
    background: var(--color-light);
}

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

.feature-card {
    background: var(--color-white);
    padding: 32px;
    border-radius: 12px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 95, 31, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--color-accent);
}

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

.feature-card p {
    color: var(--color-gray);
    line-height: 1.7;
}

/* Getting Started Section */
.getting-started {
    background: var(--color-white);
}

.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

.step:last-child {
    margin-bottom: 0;
}

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

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--color-gray);
    margin-bottom: 20px;
}

/* Code Block */
.code-block {
    background: var(--color-terminal-bg);
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2d2d2d;
}

.code-header span {
    color: #888;
    font-size: 0.875rem;
    font-family: var(--font-mono);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #888;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-mono);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

.code-block pre {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--color-terminal-text);
}

.code-block .prompt {
    color: var(--color-accent);
}

.code-block .output {
    color: #888;
    display: block;
    padding-left: 0;
}

.code-block .output.success {
    color: var(--color-success);
}

.code-block .comment {
    color: #6b7280;
    font-style: italic;
}

/* API Section */
.api-section {
    background: var(--color-light);
}

/* API Tabs */
.api-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.api-tab {
    background: transparent;
    border: 2px solid var(--color-gray-light);
    color: var(--color-gray);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.api-tab:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.api-tab.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-dark);
}

.api-examples {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.api-example h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 50%, var(--color-secondary) 100%);
    text-align: center;
    color: var(--color-white);
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: 32px;
}

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

/* Footer */
.footer {
    background: #0a0a0f;
    color: var(--color-white);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

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

.footer-brand p {
    line-height: 1.7;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.footer-brand p:last-of-type {
    margin-bottom: 0;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: var(--color-white);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--color-white);
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    margin: 0;
}

.footer-bottom .version {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .api-examples {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Prevent horizontal scroll on mobile */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        z-index: 999;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        color: var(--color-dark);
        font-size: 1.25rem;
    }

    .nav a.active {
        color: var(--color-accent);
    }

    .mobile-menu-toggle {
        display: flex;
    }

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

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

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

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

    .step {
        flex-direction: column;
        gap: 20px;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    section {
        padding: 60px 0;
    }

    /* API section mobile */
    .api-tabs {
        flex-wrap: wrap;
    }

    .api-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .api-examples {
        grid-template-columns: 1fr;
    }

    /* Hero section mobile */
    .hero {
        padding-left: 16px;
        padding-right: 16px;
        overflow: hidden;
        max-width: 100vw;
    }

    .hero-content {
        max-width: 100%;
        overflow: hidden;
        word-wrap: break-word;
    }

    .hero h1 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Hero terminal mobile */
    .hero-terminal {
        margin: 0 8px;
        border-radius: 8px;
        max-width: calc(100% - 16px);
        overflow: hidden;
    }

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

    .container {
        padding: 0 16px;
    }

    /* Code blocks mobile */
    .code-block {
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
        max-width: 100%;
        overflow: hidden;
    }

    .code-block pre {
        padding: 12px 16px;
        overflow-x: auto;
        max-width: 100%;
    }

    .code-block code {
        font-size: 0.7rem;
        line-height: 1.5;
        white-space: pre;
        display: block;
    }

    /* API section mobile overflow fix */
    .api-section {
        overflow-x: hidden;
    }

    .api-example {
        max-width: 100%;
        overflow: hidden;
    }

    .terminal {
        border-radius: 8px;
    }

    .terminal-body {
        padding: 12px;
        font-size: 0.7rem;
        overflow-x: auto;
    }

    .terminal-line {
        white-space: nowrap;
    }

    /* Steps section mobile padding */
    .step-content {
        width: 100%;
    }

    .step-content .code-block {
        margin-left: 0;
        margin-right: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

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

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

.animate-in {
    animation: fadeIn 0.6s ease forwards;
}

.feature-card,
.step,
.api-example {
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.animate-in,
.step.animate-in,
.api-example.animate-in {
    opacity: 1;
    transform: translateY(0);
}
