/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #FFFFFF;
    color: #0A2540;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    letter-spacing: -0.02em;
    color: #0A2540;
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3B82F6;
    margin-bottom: 1rem;
}

/* ---------- Backgrounds ---------- */
.bg-soft-blue {
    background-color: #F6F9FC;
}

.bg-white-section {
    background-color: #FFFFFF;
}

.bg-gradient-soft {
    background: linear-gradient(180deg, #FFFFFF 0%, #F6F9FC 100%);
}

/* Subtle dot pattern */
.bg-dots {
    background-image: radial-gradient(circle, #D6E0EA 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Grid pattern */
.bg-grid {
    background-image: 
        linear-gradient(#E6EBF1 1px, transparent 1px),
        linear-gradient(90deg, #E6EBF1 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ---------- Navbar ---------- */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-block;
    background-color: #3B82F6;
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.25);
}

/* Gentle pulse glow on primary CTA */
.btn-pulse {
    animation: softPulse 3s ease-in-out infinite;
}

@keyframes softPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(59, 130, 246, 0);
    }
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #0A2540;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 1px solid #E6EBF1;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #3B82F6;
    color: #3B82F6;
    transform: translateY(-2px);
}

/* ---------- Cards ---------- */
.card {
    background: #FFFFFF;
    border: 1px solid #E6EBF1;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: #D6E0EA;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.08);
}

/* Card with soft glow on hover */
.card-glow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.card-glow:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

/* ---------- Icon Containers ---------- */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EBF3FF;
    color: #3B82F6;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.card:hover .icon-box {
    background: #3B82F6;
    color: white;
    transform: scale(1.05);
}

/* ---------- Sections ---------- */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #E6EBF1, transparent);
    margin: 0 auto;
    max-width: 80%;
}

/* ---------- Animations: Floating ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delay-1 {
    animation: float 4s ease-in-out infinite;
    animation-delay: 0.5s;
}

.animate-float-delay-2 {
    animation: float 4s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-float-delay-3 {
    animation: float 4s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* ---------- Animations: Gradient Shimmer on Text ---------- */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.text-shimmer {
    background: linear-gradient(90deg, #3B82F6 0%, #60A5FA 25%, #3B82F6 50%, #60A5FA 75%, #3B82F6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ---------- Animations: Workflow Hero ---------- */
.workflow-container {
    position: relative;
    height: 420px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.workflow-node {
    position: absolute;
    background: #FFFFFF;
    border: 1px solid #E6EBF1;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.06);
    transition: all 0.3s ease;
    animation: float 5s ease-in-out infinite;
    z-index: 2;
}

.workflow-node:hover {
    border-color: #3B82F6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.workflow-node .node-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #EBF3FF;
    flex-shrink: 0;
}

.workflow-node .node-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0A2540;
    white-space: nowrap;
}

.workflow-node .node-sub {
    font-size: 0.7rem;
    color: #6B7C93;
    white-space: nowrap;
}

/* Node positions */
.node-1 { top: 20px; left: 0; animation-delay: 0s; }
.node-2 { top: 100px; right: 0; animation-delay: 0.6s; }
.node-3 { top: 200px; left: 20px; animation-delay: 1.2s; }
.node-4 { top: 300px; right: 20px; animation-delay: 1.8s; }

/* SVG connection lines */
.workflow-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.workflow-line {
    fill: none;
    stroke: #D6E0EA;
    stroke-width: 2;
    stroke-dasharray: 6 6;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -200;
    }
}

/* Moving dots along path */
.workflow-dot {
    fill: #3B82F6;
    r: 4;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.6));
}

.workflow-dot-anim {
    animation: moveAlong 3s linear infinite;
}

/* Small data particles */
@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.animate-pulse-soft {
    animation: pulse 2s ease-in-out infinite;
}

/* ---------- Animations: Marquee (stats/ticker) ---------- */
.marquee {
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    animation: marquee 30s linear infinite;
}

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

/* ---------- Fade In on Scroll ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

::-webkit-scrollbar-track {
    background: #F6F9FC;
}

::-webkit-scrollbar-thumb {
    background: #C9D6E3;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3B82F6;
}

/* ---------- Forms ---------- */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #E6EBF1;
    border-radius: 0.5rem;
    background: #FFFFFF;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    display: block;
    color: #0A2540;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* ---------- Article Content ---------- */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0A2540;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #0A2540;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-content p {
    color: #425466;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }

.article-content li {
    color: #425466;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-content a {
    color: #3B82F6;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-content a:hover { color: #2563EB; }

.article-content blockquote {
    border-left: 4px solid #3B82F6;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #425466;
    background-color: #F6F9FC;
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-content strong {
    color: #0A2540;
    font-weight: 600;
}

/* ---------- Calendly Widget ---------- */
.calendly-inline-widget {
    min-width: 320px;
    height: 700px;
}

@media (max-width: 768px) {
    .calendly-inline-widget { height: 600px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .article-content h2 { font-size: 1.5rem; }
    .article-content h3 { font-size: 1.25rem; }
    .article-content p { font-size: 1rem; }
    
    .workflow-container {
        height: 340px;
        max-width: 100%;
    }
    
    .workflow-node {
        padding: 8px 12px;
    }
    
    .workflow-node .node-label { font-size: 0.7rem; }
    .workflow-node .node-sub { font-size: 0.65rem; }
    .workflow-node .node-icon {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    
    .node-1 { top: 10px; left: 0; }
    .node-2 { top: 90px; right: 0; }
    .node-3 { top: 180px; left: 10px; }
    .node-4 { top: 270px; right: 10px; }
}

/* ---------- Print ---------- */
@media print {
    nav, footer { display: none; }
    body { background: white; }
}

/* ============================================
   n8n-Style Workflow Component
   ============================================ */
.n8n-workflow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 0;
    max-width: 380px;
    margin: 0 auto;
}

.n8n-row {
    display: flex;
    width: 100%;
}

.n8n-row.left {
    justify-content: flex-start;
}

.n8n-row.right {
    justify-content: flex-end;
}

.n8n-node {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid #E6EBF1;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.05);
    position: relative;
    transition: all 0.3s ease;
    width: 240px;
    animation: nodeFloat 6s ease-in-out infinite;
}

.n8n-node:hover {
    border-color: #3B82F6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

@keyframes nodeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.n8n-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

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

.n8n-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0A2540;
    line-height: 1.2;
}

.n8n-desc {
    font-size: 0.7rem;
    color: #6B7C93;
    margin-top: 2px;
    line-height: 1.2;
}

/* n8n connection ports */
.n8n-port {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #3B82F6;
    z-index: 2;
}

.n8n-port-in {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.n8n-port-out {
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.n8n-trigger .n8n-port-in {
    display: none;
}

.n8n-success .n8n-port-out {
    display: none;
}

/* Connector with SVG-style path */
.n8n-connector {
    position: relative;
    height: 50px;
    width: 100%;
}

.n8n-connector svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.n8n-connector-path {
    fill: none;
    stroke: #C9D6E3;
    stroke-width: 2;
    stroke-dasharray: 4 4;
}

.n8n-flow-dot {
    fill: #3B82F6;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.8));
}

/* ============================================
   Carousel Component
   ============================================ */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.carousel-viewport {
    overflow: hidden;
    flex: 1;
    padding: 20px 4px;
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
    display: flex;
}

.carousel-slide > a,
.carousel-slide > div {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #E6EBF1;
    color: #0A2540;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.06);
}

.carousel-btn:hover {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: #FFFFFF;
    color: #0A2540;
    border-color: #E6EBF1;
    transform: none;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C9D6E3;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: #3B82F6;
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 1024px) {
    .carousel-slide {
        flex: 0 0 calc((100% - 24px) / 2);
    }
}

@media (max-width: 640px) {
    .carousel-slide {
        flex: 0 0 100%;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
    }
}