/* ==========================================================================
   MAIA - Event Intelligence OS
   Landing Page Styles
   ========================================================================== */

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

:root {
    --bg-primary: #0a0f1e;
    --bg-secondary: #0d1329;
    --bg-card: #111833;
    --bg-card-hover: #151d3d;
    --bg-surface: #0f1630;
    --border-subtle: rgba(59, 130, 246, 0.12);
    --border-active: rgba(59, 130, 246, 0.35);
    --border-glow: rgba(6, 182, 212, 0.3);
    --text-primary: #e8edf5;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 40%, #06b6d4 100%);
    --gradient-hero-bg: linear-gradient(125deg, #0a0f1e 0%, #111833 25%, #0a1628 50%, #0d1a2e 75%, #0a0f1e 100%);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow-blue: 0 0 40px rgba(59, 130, 246, 0.15);
    --shadow-glow-cyan: 0 0 40px rgba(6, 182, 212, 0.12);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
}

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

/* ---------- Background Effects ---------- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.025;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 48px;
    background: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 15, 30, 0.95);
    border-bottom-color: var(--border-active);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    font-weight: 900;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.logo-text {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.logo-separator {
    width: 1px;
    height: 20px;
    background: var(--border-subtle);
    margin: 0 4px;
}

.logo-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-highlight {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.nav-link-highlight::after {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
}

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

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 48px 60px;
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
}

.hero-gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(59, 130, 246, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 70% 40% at 50% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
    animation: heroGradientShift 8s ease-in-out infinite alternate;
}

@keyframes heroGradientShift {
    0% {
        background:
            radial-gradient(ellipse 80% 60% at 20% 40%, rgba(59, 130, 246, 0.12) 0%, transparent 70%),
            radial-gradient(ellipse 60% 50% at 80% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
            radial-gradient(ellipse 70% 40% at 50% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
    }
    33% {
        background:
            radial-gradient(ellipse 70% 50% at 30% 50%, rgba(139, 92, 246, 0.10) 0%, transparent 70%),
            radial-gradient(ellipse 80% 60% at 70% 20%, rgba(6, 182, 212, 0.10) 0%, transparent 70%),
            radial-gradient(ellipse 60% 50% at 60% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    }
    66% {
        background:
            radial-gradient(ellipse 60% 40% at 50% 30%, rgba(6, 182, 212, 0.12) 0%, transparent 70%),
            radial-gradient(ellipse 70% 60% at 20% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
            radial-gradient(ellipse 80% 50% at 80% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    }
    100% {
        background:
            radial-gradient(ellipse 80% 50% at 40% 35%, rgba(59, 130, 246, 0.10) 0%, transparent 70%),
            radial-gradient(ellipse 60% 60% at 75% 45%, rgba(139, 92, 246, 0.12) 0%, transparent 70%),
            radial-gradient(ellipse 70% 40% at 30% 75%, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    }
}

.hero-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

.hero-content {
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

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

@keyframes badgePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.hero-title {
    font-size: clamp(56px, 8vw, 96px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 12px;
}

.gradient-text {
    background: var(--gradient-hero);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 4s ease-in-out infinite alternate;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 28px;
}

.hero-description {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-description strong {
    color: var(--accent-cyan);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
}

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    border-color: var(--border-active);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ---------- Pipeline Diagram (Hero) ---------- */
.hero-visual {
    margin-top: 72px;
}

.pipeline-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 36px 40px;
    background: rgba(17, 24, 51, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(12px);
    overflow-x: auto;
}

.pipeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    padding: 8px;
    cursor: default;
    transition: all 0.3s ease;
}

.pipeline-node:hover {
    transform: translateY(-4px);
}

.node-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 15px;
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.node-icon svg {
    width: 26px;
    height: 26px;
}

.node-sources .node-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}
.node-crawler .node-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}
.node-llm .node-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}
.node-events .node-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}
.node-insights .node-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
}

.pipeline-node:hover .node-icon {
    transform: scale(1.1);
}

.node-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.node-count {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    white-space: nowrap;
}

.pipeline-connector {
    width: 48px;
    height: 2px;
    position: relative;
    flex-shrink: 0;
}

.connector-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--border-subtle), var(--border-active), var(--border-subtle));
}

.connector-pulse {
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-blue);
    animation: connectorPulse 2s ease-in-out infinite;
}

@keyframes connectorPulse {
    0% { left: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: calc(100% - 8px); opacity: 0; }
}

.pipeline-connector:nth-of-type(2) .connector-pulse { animation-delay: 0.4s; }
.pipeline-connector:nth-of-type(4) .connector-pulse { animation-delay: 0.8s; }
.pipeline-connector:nth-of-type(6) .connector-pulse { animation-delay: 1.2s; }
.pipeline-connector:nth-of-type(8) .connector-pulse { animation-delay: 1.6s; }

/* ---------- Stats Section ---------- */
.stats-section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(13, 19, 41, 0.5);
}

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

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-active);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-blue);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    padding: 10px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon-blue { background: rgba(59, 130, 246, 0.12); color: var(--accent-blue); }
.stat-icon-purple { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
.stat-icon-green { background: rgba(16, 185, 129, 0.12); color: var(--accent-green); }
.stat-icon-cyan { background: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); }

.stat-value {
    font-size: 36px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* ---------- Sections Common ---------- */
.features-section,
.architecture-section,
.pipeline-section,
.api-section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.architecture-section {
    background: rgba(13, 19, 41, 0.3);
}

.pipeline-section {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-badge {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-purple);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
}

/* ---------- Features Grid ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

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

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    padding: 10px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-icon-blue { background: rgba(59, 130, 246, 0.12); color: var(--accent-blue); }
.feature-icon-purple { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
.feature-icon-green { background: rgba(16, 185, 129, 0.12); color: var(--accent-green); }
.feature-icon-orange { background: rgba(245, 158, 11, 0.12); color: var(--accent-orange); }
.feature-icon-red { background: rgba(239, 68, 68, 0.12); color: var(--accent-red); }
.feature-icon-cyan { background: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); }

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ---------- Architecture Layers ---------- */
.arch-layers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.arch-layer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.arch-layer:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-glow-blue);
}

.layer-number {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    min-width: 40px;
    flex-shrink: 0;
}

.layer-bar {
    width: 3px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.layer-1 .layer-number { color: var(--accent-blue); }
.layer-1 .layer-bar { background: var(--accent-blue); }
.layer-2 .layer-number { color: var(--accent-purple); }
.layer-2 .layer-bar { background: var(--accent-purple); }
.layer-3 .layer-number { color: var(--accent-green); }
.layer-3 .layer-bar { background: var(--accent-green); }
.layer-4 .layer-number { color: var(--accent-orange); }
.layer-4 .layer-bar { background: var(--accent-orange); }
.layer-5 .layer-number { color: var(--accent-red); }
.layer-5 .layer-bar { background: var(--accent-red); }
.layer-6 .layer-number { color: var(--accent-cyan); }
.layer-6 .layer-bar { background: var(--accent-cyan); }
.layer-7 .layer-number { color: var(--accent-pink); }
.layer-7 .layer-bar { background: var(--accent-pink); }
.layer-8 .layer-number { color: #a78bfa; }
.layer-8 .layer-bar { background: #a78bfa; }

.layer-content {
    flex: 1;
}

.layer-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.layer-content p {
    font-size: 13px;
    color: var(--text-muted);
}

.layer-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.layer-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.layer-status.building {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.layer-status.planned {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.25);
}

/* ---------- Pipeline Flow ---------- */
.pipeline-flow {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    position: relative;
}

.pipeline-flow::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-green), var(--accent-orange), var(--accent-cyan));
    opacity: 0.3;
    z-index: 0;
}

.flow-step {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.flow-step:hover {
    border-color: var(--border-active);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-blue);
}

.flow-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.flow-step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.flow-step-header h4 {
    font-size: 14px;
    font-weight: 600;
}

.flow-step-body {
    padding: 16px 20px;
}

.flow-step-body code {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 3px 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.flow-step-body p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---------- API Section ---------- */
.api-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.api-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.api-card:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
}

.api-method {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.api-method.get {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.api-method.post {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

.api-info {
    flex: 1;
    min-width: 0;
}

.api-endpoint {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    display: block;
    margin-bottom: 2px;
}

.api-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.api-example {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.api-example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.api-example-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.api-example-lang {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 2px 8px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-sm);
}

.api-example-code {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
}

.api-example-code code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-cyan);
    line-height: 1.8;
}

/* ---------- Footer ---------- */
.footer {
    position: relative;
    z-index: 1;
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(10, 15, 30, 0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 60px;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 280px;
    line-height: 1.6;
}

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

.footer-col h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px 0;
    transition: color 0.2s ease;
}

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

.footer-meta {
    text-align: right;
}

.footer-meta p {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.footer-copy {
    margin-top: 8px;
    font-family: var(--font-primary);
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.6;
}

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

    .pipeline-flow {
        grid-template-columns: repeat(3, 1fr);
    }

    .pipeline-flow::before {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links {
        gap: 32px;
    }

    .footer-meta {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .navbar {
        padding: 12px 20px;
    }

    .nav-links {
        display: none;
    }

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

    .logo-separator,
    .logo-subtitle {
        display: none;
    }

    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    .hero-title {
        font-size: clamp(48px, 12vw, 72px);
    }

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

    .btn {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline-diagram {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        padding: 24px 20px;
    }

    .pipeline-connector {
        display: none;
    }

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

    .features-section,
    .architecture-section,
    .pipeline-section,
    .api-section {
        padding: 60px 0;
    }

    .pipeline-flow {
        grid-template-columns: 1fr;
    }

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

    .api-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

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

    .arch-layer {
        padding: 14px 16px;
        gap: 12px;
    }

    .layer-status {
        display: none;
    }
}

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

    .hero-title {
        letter-spacing: -2px;
    }
}

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

.hero-badge { animation: fadeInUp 0.7s ease-out; }
.hero-title { animation: fadeInUp 0.7s ease-out 0.1s both; }
.hero-subtitle { animation: fadeInUp 0.7s ease-out 0.15s both; }
.hero-description { animation: fadeInUp 0.7s ease-out 0.2s both; }
.hero-actions { animation: fadeInUp 0.7s ease-out 0.3s both; }
.hero-visual { animation: fadeInUp 0.7s ease-out 0.45s both; }

/* Scroll reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.35);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}
