/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme colors - GitHub dark inspired */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border: #30363d;
    
    /* Text colors */
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    
    /* Accent colors */
    --accent-green: #a6e3a1;
    --accent-cyan: #89dceb;
    --accent-blue: #89b4fa;
    --accent-red: #f38ba8;
    --accent-yellow: #f9e2af;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-cyan) 50%, var(--accent-blue) 100%);
    
    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(137, 180, 250, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 560px;
    min-width: 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-style: italic;
    letter-spacing: 0.04em;
    color: var(--accent-cyan);
    border: 1px solid rgba(137, 220, 235, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    margin-bottom: var(--spacing-sm);
    background: rgba(13, 17, 23, 0.7);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
}

.hero-install {
    margin-bottom: var(--spacing-md);
}

.install-command {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.install-command:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 16px rgba(137, 220, 235, 0.2);
}

.install-command code {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--accent-green);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}

.copy-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-badges {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero-badges img {
    height: 20px;
}

.market-pills {
    margin-top: var(--spacing-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.market-pills span {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.24rem 0.6rem;
    background: rgba(22, 27, 34, 0.65);
}

/* ===== TERMINAL MOCKUP ===== */
.terminal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: min(100%, 760px);
    margin-inline: auto;
}

.hero-terminal {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.terminal-header {
    background: var(--bg-tertiary);
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

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

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

.btn-close { background: #ff5f56; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #27c93f; }

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

.terminal-body {
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: clamp(0.66rem, 0.78vw, 0.95rem);
    height: 320px;
    background: var(--bg-primary);
    text-align: left;
    line-height: 1.45;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.terminal-line {
    color: var(--accent-green);
    margin-bottom: 0.25rem;
    text-align: left;
    white-space: pre;
}

.terminal-cursor {
    display: inline-block;
    animation: blink 1s step-start infinite;
    color: var(--accent-cyan);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ===== HIGHLIGHTS SECTION ===== */
.highlights {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
    border-bottom: 1px solid rgba(137, 220, 235, 0.08);
}

/* Agent Setup CTA */
.agent-setup {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(168,85,247,0.08));
    text-align: center;
}

.agent-setup-code {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.agent-setup-block {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    max-width: 500px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.agent-dim { opacity: 0.5; }
.agent-highlight { color: #a78bfa; }

.highlights-marquee {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.highlights-scroller {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

.highlights-marquee:hover .highlights-scroller {
    animation-play-state: paused;
}

.highlights-track {
    display: flex;
    gap: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.highlight-card {
    width: min(420px, 78vw);
    background: linear-gradient(160deg, rgba(13, 17, 23, 0.95) 0%, rgba(22, 27, 34, 0.95) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    opacity: 0;
    transform: translateY(20px);
}

.highlight-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.highlight-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 12px 24px rgba(137, 220, 235, 0.12);
    transform: translateY(-4px);
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.highlight-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.highlight-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-meta {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.meta-label {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.meta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(137, 220, 235, 0.35);
    background: rgba(13, 17, 23, 0.55);
    color: var(--accent-cyan);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.meta-link:hover {
    border-color: var(--accent-cyan);
    background: rgba(137, 220, 235, 0.12);
    color: var(--text-primary);
}

/* ===== DEMO SECTION ===== */
.demo {
    padding: var(--spacing-xl) 0;
    background: var(--bg-tertiary);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
}

.demo-terminal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.demo-terminal img {
    width: 100%;
    display: block;
}

/* Gallery tabs */
.gallery-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.25rem;
}

.gallery-tabs::-webkit-scrollbar {
    display: none;
}

.gallery-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.gallery-tab:hover {
    background: var(--bg-tertiary, #2a2a3e);
    color: var(--text-primary);
    border-color: var(--accent);
}

.gallery-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.gallery-viewport {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.gallery-slide {
    display: none;
}

.gallery-slide.active {
    display: block;
}

.gallery-slide img {
    width: 100%;
    display: block;
}

.gallery-caption {
    text-align: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

/* ===== AGENT WORKFLOWS ===== */
.agent-workflows {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(180deg, rgba(13, 17, 23, 1) 0%, rgba(22, 27, 34, 1) 100%);
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: var(--spacing-md);
}

.stack-cards {
    grid-template-columns: 1fr;
    max-width: 980px;
    margin: 0 auto;
    gap: 1.15rem;
}

.stack-cards .agent-card {
    padding: 1.35rem 1.5rem;
}

.agent-card {
    background: rgba(13, 17, 23, 0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.agent-card:hover::before {
    opacity: 1;
}

.agent-card h3 {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-cyan);
}

.agent-card p {
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
}

.agent-card .cli-command {
    display: block;
    background: rgba(22, 27, 34, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ===== YOUR DATABASE SECTION ===== */
.your-database {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.database-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.database-feature {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.database-icon {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

.database-feature h3 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

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

.database-feature code {
    background: var(--bg-tertiary);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--accent-cyan);
}

.database-schema {
    max-width: 680px;
    margin: var(--spacing-lg) auto var(--spacing-lg);
}

.architecture-overview {
    max-width: 900px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(13, 17, 23, 0.96) 0%, rgba(22, 27, 34, 0.96) 100%);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md);
}

.database-schema .terminal-body {
    height: auto;
    padding: var(--spacing-md);
}

.schema-body {
    overflow-x: auto;
}

.schema-pre {
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 0.78vw, 0.88rem);
    line-height: 1.7;
    margin: 0;
    white-space: pre;
}

.schema-table {
    color: var(--accent-cyan);
    font-weight: 600;
}

.schema-desc {
    color: var(--text-tertiary);
}

@media (max-width: 768px) {
    .database-grid {
        grid-template-columns: 1fr;
    }

    .schema-pre {
        font-size: 0.62rem;
    }
}

@media (max-width: 480px) {
    .database-feature {
        padding: var(--spacing-md);
    }

    .schema-pre {
        font-size: 0.58rem;
    }
}

/* ===== CLI SECTION ===== */
.cli {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
}

.architecture-analytics {
    background: linear-gradient(180deg, rgba(33, 38, 45, 1) 0%, rgba(22, 27, 34, 1) 100%);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
    border-bottom: 1px solid rgba(137, 220, 235, 0.08);
}

.architecture-ai {
    background: linear-gradient(180deg, rgba(22, 27, 34, 1) 0%, rgba(22, 27, 34, 1) 100%);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
}

.analytics-engine .agent-grid {
    grid-template-columns: 1fr;
    max-width: 980px;
    margin: 0 auto;
    gap: 1.15rem;
}

.analytics-engine .agent-card {
    padding: 1.35rem 1.5rem;
}

.cli-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.cli-example {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.cli-command {
    color: var(--accent-cyan);
    margin-bottom: var(--spacing-sm);
}

.cli-output {
    color: var(--text-primary);
    white-space: pre-wrap;
}

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

/* ===== INSTALLATION SECTION ===== */
.installation {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
}

.install-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.install-tab {
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* iOS touch target guideline */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.install-tab:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

.install-tab.active {
    color: var(--bg-primary);
    border-color: transparent;
    background: var(--gradient-primary);
    font-weight: 600;
}

.install-panel {
    max-width: 900px;
    margin: 0 auto;
}

.install-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
    color: var(--accent-cyan);
}

.install-panel p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    position: relative;
    overflow-x: auto;
}

.code-block code {
    color: var(--text-primary);
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn-small {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* ===== COMPARISON TABLE ===== */
.comparison {
    padding: var(--spacing-xl) 0;
    background: var(--bg-tertiary);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-table td {
    color: var(--text-secondary);
}

.comparison-table .highlight {
    color: var(--accent-green);
    font-weight: 600;
}

.comparison-table tbody tr:hover {
    background: var(--bg-primary);
}

/* ===== OPEN SOURCE SECTION ===== */
.open-source {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(137, 220, 235, 0.08);
}

.oss-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: var(--spacing-xs);
}

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

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

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

.btn-primary:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(137, 220, 235, 0.3);
}

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

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

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

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-install {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-badges {
        justify-content: center;
    }

    .market-pills {
        justify-content: center;
    }
    
    .terminal-body {
        min-height: 300px;
        font-size: 0.76rem;
    }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 2.5rem;
        --spacing-xl: 3.5rem;
        --spacing-md: 1.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .install-command {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .install-command code {
        font-size: 0.7rem;
    }
    
    .terminal-body {
        padding: var(--spacing-sm);
        height: 280px;
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .agent-setup-block {
        font-size: 0.75rem;
        padding: 1rem;
        max-width: 100%;
    }

    .highlights-marquee {
        mask-image: none;
        -webkit-mask-image: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .highlights-track {
        gap: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }

    .highlight-card {
        width: min(84vw, 360px);
        flex-shrink: 0;
    }
    
    /* CLI: single column */
    .cli-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }
    
    /* Comparison table: horizontal scroll with hints */
    .comparison-table-wrapper {
        position: relative;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    /* OSS stats */
    .oss-stats {
        gap: var(--spacing-md);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
        --spacing-md: 1rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }

    .agent-setup {
        padding: 2rem 0;
    }

    .agent-setup-block {
        font-size: 0.7rem;
        padding: 0.75rem;
        line-height: 1.6;
        word-break: break-word;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Install command: keep single line + ellipsis on mobile */
    .install-command {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .install-command code {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: normal;
        overflow-wrap: normal;
        min-width: 0;
        width: auto;
    }

    .copy-btn {
        flex: 0 0 auto;
    }
    
    /* Copy buttons: proper touch targets (44px min) */
    .copy-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
    
    .copy-btn-small {
        min-width: 44px;
        min-height: 36px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Terminal mockup */
    .terminal-body {
        padding: 0.75rem;
        height: 240px;
        font-size: 0.7rem;
    }
    
    .terminal-header {
        padding: 0.5rem 0.75rem;
    }
    
    .terminal-title {
        font-size: 0.75rem;
    }
    
    /* Highlights */
    .highlight-card {
        padding: var(--spacing-sm);
    }
    
    .highlight-icon {
        font-size: 1.7rem;
    }
    
    .highlight-card h3 {
        font-size: 1.1rem;
    }
    
    .highlight-card p {
        font-size: 0.9rem;
    }
    
    /* CLI examples */
    .cli-example {
        padding: var(--spacing-sm);
    }
    
    .cli-command {
        font-size: 0.8rem;
    }
    
    .cli-output {
        font-size: 0.8rem;
        word-break: break-word;
    }
    
    /* Code blocks */
    .code-block {
        padding: var(--spacing-sm);
        padding-right: 3.5rem;
    }
    
    .code-block code {
        font-size: 0.7rem;
        word-break: break-all;
    }
    
    /* Comparison table: make scrollable with visual cue */
    .comparison-table-wrapper {
        margin: 0 -0.75rem;
        padding: 0 0.75rem;
    }
    
    .comparison-table {
        font-size: 0.75rem;
        min-width: 500px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.4rem;
    }
    
    /* Footer */
    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
    
    /* Section spacing tighter on mobile */
    .highlights,
    .demo,
    .agent-workflows,
    .cli,
    .installation,
    .comparison,
    .open-source {
        padding: var(--spacing-lg) 0;
    }
    
    /* Badges wrap nicely */
    .hero-badges {
        gap: 0.5rem;
    }
    
    /* Demo image */
    .demo-terminal {
        border-radius: var(--radius-sm);
    }
    
    .demo-terminal img {
        border-radius: var(--radius-sm);
    }

    /* Gallery tabs: scroll horizontally on mobile */
    .gallery-tab {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    .gallery-caption {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Small phones (iPhone SE, etc) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .install-command code {
        font-size: 0.62rem;
    }
    
    .terminal-body {
        font-size: 0.6rem;
        height: 220px;
    }
}
