:root {
    /* Vibrant Cosmic Palette inspired by n8n */
    --primary: #0a0a14;
    --secondary: #1a1b2e;
    --accent: #6366f1;
    --highlight: #8b5cf6;
    --text: #ffffff;
    --text-dim: #e2e8f0;
    --success: #22c55e;
    --warning: #f59e0b;
    --card-bg: rgba(26, 27, 46, 0.9);
    --border: rgba(139, 92, 246, 0.3);
    --electric: #00f5ff;
    --neon: #7c3aed;
    --gradient-hero: linear-gradient(135deg, #4a1d5f 0%, #2d1b69 50%, #1e3a8a 100%);
    --gradient-card: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.4);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gradient-hero);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        rgba(0, 0, 0, 0.2),
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 245, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 1.5rem 0;
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-glow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--electric);
    text-decoration: none;
    letter-spacing: -0.02em;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: var(--electric);
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.6);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--electric), var(--neon));
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 8rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--electric) 0%, var(--highlight) 50%, var(--neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 
        0 0 30px rgba(102, 126, 234, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.8),
        -1px -1px 2px rgba(255, 255, 255, 0.3);
    /* Fallback for better readability */
    color: #ffffff;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text);
    max-width: 750px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--highlight), var(--neon));
    color: white;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
    border-color: var(--electric);
}

/* Philosophy Section */
.philosophy-section {
    padding: 6rem 0;
    text-align: center;
    position: relative;
}

.philosophy-section::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

.philosophy-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--electric) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.philosophy-section > p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 650px;
    margin: 0 auto 4rem;
    line-height: 1.6;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
    text-align: left;
}

.philosophy-card {
    background: var(--gradient-card);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.philosophy-card:hover {
    transform: translateY(-8px);
    border-color: var(--electric);
    box-shadow: var(--shadow-glow);
}

.philosophy-card h3 {
    color: var(--highlight);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

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

/* Interactive Demo */
.interactive-section {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 4rem;
    margin: 6rem 0;
    box-shadow: var(--shadow-glow);
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.interactive-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.interactive-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--electric) 0%, var(--neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 255, 255, 0.3);
}

.interactive-section .text-dim {
    color: var(--text);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.demo-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.demo-btn {
    background: linear-gradient(135deg, var(--highlight), var(--neon));
    color: var(--text);
    border: 2px solid transparent;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.demo-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.demo-btn:hover::before {
    left: 100%;
}

.demo-btn:hover {
    transform: translateY(-3px);
    border-color: var(--electric);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

.terminal-window {
    background: #0a0a14;
    border-radius: 12px;
    padding: 1.5rem;
    height: 400px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.terminal-line {
    opacity: 0;
    white-space: pre-wrap;
    transition: opacity 0.5s ease;
    margin-bottom: 0.25rem;
}

.terminal-line.success {
    color: var(--success);
    font-weight: 600;
    margin-top: 0.75rem;
}

/* Stats Section */
.stats-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.9) 0%, rgba(26, 27, 46, 0.9) 100%);
    margin: 4rem 0;
    border-radius: 32px;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

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

.stats-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--electric) 0%, var(--neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.stats-section p {
    color: var(--text-dim);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    text-align: center;
    margin: 4rem 0;
    position: relative;
    z-index: 1;
}

.stat {
    background: rgba(26, 27, 46, 0.8);
    backdrop-filter: blur(15px);
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat:hover::before {
    opacity: 1;
}

.stat:hover {
    transform: translateY(-6px);
    border-color: var(--electric);
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.2);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--electric) 0%, var(--highlight) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-title {
    color: var(--text-dim);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.8) 0%, rgba(26, 27, 46, 0.8) 100%);
    margin: 4rem 0;
    border-radius: 32px;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--electric) 0%, var(--neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.contact-section p {
    color: var(--text-dim);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background: rgba(26, 27, 46, 0.6);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--electric);
    box-shadow: 0 15px 30px rgba(0, 245, 255, 0.2);
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.contact-card p {
    margin: 0;
    font-size: 1rem;
}

.contact-card a {
    color: var(--electric);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-card a:hover {
    color: var(--neon);
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.6);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    background: rgba(11, 16, 32, 0.3);
}

footer p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .hero {
        padding: 3rem 0 4rem;
    }
    
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .interactive-section {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }
}
