:root {
    /* Color Palette */
    --bg-dark: #05050A;
    /* Deepest black with a hint of blue */
    --bg-surface: #0f0f16;
    --bg-surface-glass: rgba(15, 15, 22, 0.4);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --accent-blue: #0ea5e9;
    --accent-blue-dim: rgba(14, 165, 233, 0.15);

    --accent-purple: #8b5cf6;
    --accent-purple-dim: rgba(139, 92, 246, 0.15);

    --accent-pink: #d946ef;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --gradient-text: linear-gradient(to right, #60a5fa, #c084fc, #f472b6);

    /* Constants */
    --radius-md: 12px;
    --radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1.2;
    font-weight: 700;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Background Glow Effects */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.top-glow {
    top: -200px;
    left: -100px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
}

.bottom-glow {
    bottom: 20%;
    right: -200px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: inherit;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 10px 20px -10px var(--accent-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px var(--accent-blue);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    user-select: none;
}

.logo .flow {
    color: var(--text-main);
}

.logo .stack {
    color: var(--accent-blue);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.nav-links a:not(.btn):hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
    background-image: url('santiago-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Background image filter layer to simulate Golden Hour LUT */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Apply golden hour filters: warmth, slight sepia, high saturation, and contrast */
    background: inherit;
    filter: sepia(40%) saturate(150%) hue-rotate(-10deg) contrast(110%) brightness(110%);
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(5, 5, 10, 0.2) 0%,
            rgba(5, 5, 10, 0.5) 50%,
            rgba(5, 5, 10, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    z-index: 10;
}

.badge {
    background: var(--accent-blue);
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: slideUpFade 0.8s ease forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 24px;
    animation: slideUpFade 0.8s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
    animation: slideUpFade 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    animation: slideUpFade 0.8s ease 0.3s forwards;
    opacity: 0;
}

/* Explicit n8n Logo Inspired Graphic */
.n8n-logo-graphic {
    margin-top: 60px;
    width: 100%;
    max-width: 400px;
    height: 250px;
    position: relative;
    animation: fade-in 1.5s ease 0.5s forwards;
    opacity: 0;
}

.n8n-circle {
    position: absolute;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.solid-orange {
    background: #10b981;
    /* Emerald Green */
}

.solid-red {
    background: #06b6d4;
    /* Cyan */
}

.solid-pink {
    background: #3b82f6;
    /* Blue */
}

.solid-purple {
    background: #8b5cf6;
}

.solid-blue {
    background: #4f46e5;
}

.n8n-logo-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.n8n-line {
    fill: none;
    /* Electric Blue from CTA buttons */
    stroke: var(--accent-blue);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Glass Panels (Reusable) */
.glass-panel {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
}

/* Services Section */
.services {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid {
    display: grid;
    gap: 24px;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-card {
    padding: 40px 32px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.03), transparent 70%);
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5), 0 0 30px -10px var(--accent-blue-dim);
}

.icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.blue-icon {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

.purple-icon {
    background: var(--accent-purple-dim);
    color: var(--accent-purple);
}

.pink-icon {
    background: rgba(217, 70, 239, 0.15);
    color: var(--accent-pink);
}

.green-icon {
    background: rgba(16, 185, 129, 0.15);
    /* Tailwind emerald-500 */
    color: #10b981;
}

.orange-icon {
    background: rgba(249, 115, 22, 0.15);
    /* Tailwind orange-500 */
    color: #f97316;
}

.yellow-icon {
    background: rgba(234, 179, 8, 0.15);
    /* Tailwind yellow-500 */
    color: #eab308;
}

.teal-icon {
    background: rgba(20, 184, 166, 0.15);
    /* Tailwind teal-500 */
    color: #14b8a6;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #020205;
    padding: 80px 0 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info {
    max-width: 300px;
}

.footer-info p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 0.95rem;
}

.footer-contact h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.contact-form {
    display: flex;
    gap: 12px;
}

.contact-form input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 100px;
    color: white;
    font-family: inherit;
    outline: none;
    flex: 1;
    min-width: 250px;
    transition: var(--transition-fast);
}

.contact-form input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
}

/* Animations */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* Utilities for JS */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .nav-links {
        display: none;
    }

    .contact-form {
        flex-direction: column;
    }

    .contact-form input {
        min-width: 100%;
    }
}