/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --bg-color: #05070D;
    --card-color: #0B1020;
    --border-color: rgba(255, 255, 255, .08);
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --gradient-blue: #3B82F6;
    --gradient-purple: #7C3AED;
    --gradient-cyan: #06B6D4;
    
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
}

/* ===== BASE & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all .3s ease;
    display: inline-block;
    border: 1px solid transparent;
}

.btn-primary {
    background-image: linear-gradient(to right, var(--gradient-blue), var(--gradient-purple), var(--gradient-blue));
    background-size: 200% auto;
    color: white;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background-position: -100% 0;
}

.btn-secondary {
    background-color: rgba(255,255,255, .05);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: rgba(255,255,255, .1);
}

.btn-tertiary {
    background: transparent;
    color: var(--text-secondary);
}
.btn-tertiary:hover {
    color: var(--text-primary);
}
.btn-tertiary:hover svg {
    transform: translateX(4px);
}
.btn-tertiary svg {
    margin-left: 0.5rem;
    transition: transform .3s ease;
    vertical-align: middle;
}

/* ===== ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HEADER ===== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background-color .3s ease, backdrop-filter .3s ease, padding .3s ease;
}

#main-header.scrolled {
    background-color: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 600;
}

.main-menu {
    display: flex;
    gap: 2rem;
}

.main-menu a {
    color: var(--text-secondary);
    transition: color .3s ease;
}

.main-menu a:hover {
    color: var(--text-primary);
}

.menu-buttons {
    display: flex;
    gap: 1rem;
}

#mobile-menu-toggle { display: none; }

/* Mega Menu */
.has-megamenu { position: relative; }
.mega-menu { /* Changed from display: none to use opacity and visibility for animation */
    display: block; /* Keep it block for layout, but hide with opacity/visibility */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding-top: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease; /* Smooth transition */
}
.has-megamenu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0); /* Final state on hover */
}

.mega-menu-content {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Added shadow for depth */
    min-width: 400px;
}
.mega-menu-content .menu-column ul li a {
    display: flex;
    align-items: flex-start; /* Align icon and text */
    gap: 0.75rem;
    padding: 0.5rem 0.75rem; /* Added horizontal padding for better hover area */
    color: var(--text-secondary);
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}
.mega-menu-content .menu-column ul li a:hover {
    color: var(--text-primary);
    background-color: rgba(255,255,255,0.05); /* Adjusted hover background */
}
.mega-menu-content .menu-column ul li a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0; /* Prevent icon from shrinking */
    color: var(--gradient-blue); /* Icon color */
}
.mega-menu-content .menu-column ul li a .item-text {
    display: flex;
    flex-direction: column;
}
.mega-menu-content .menu-column ul li a .item-text span {
    font-weight: 500;
    color: var(--text-primary);
}
.mega-menu-content .menu-column ul li a .item-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ===== HERO SECTION ===== */
#hero {
    position: relative;
    padding: 12rem 0 8rem;
    text-align: center;
    overflow: hidden;
    background: transparent; /* Changed to transparent to show particle background */
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.15), transparent 60%),
                radial-gradient(ellipse at bottom, rgba(124, 58, 237, 0.15), transparent 70%);
    z-index: -2;
    animation: genericPan 15s ease-in-out infinite alternate;
}

#hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.15), transparent 40%), /* Increased opacity and spread */
                radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.15), transparent 40%); /* Increased opacity and spread */
    z-index: -2; /* Below particles */
    animation: genericPan 20s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes genericPan {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}

#particle-canvas {
    position: fixed; /* Changed to fixed for full-page background */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Use viewport height */
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 700px;
    margin: 0 auto 4rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3); /* Subtle text shadow for depth */
    background: linear-gradient(to right, var(--text-primary) 70%, var(--text-secondary)); /* Kept original gradient for text */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

.hero-dashboard {
    max-width: 900px;
    margin: 0 auto;
    perspective: 1500px;
}

.dashboard-window {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5);
    transform: rotateX(15deg);
    transform-origin: center bottom; /* Added for better perspective */
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: rotateX(15deg) translateY(0px); }
    50% { transform: rotateX(15deg) translateY(-20px); }
    100% { transform: rotateX(15deg) translateY(0px); }
}

.dashboard-header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dots { display: flex; gap: 0.5rem; }
.dots span {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.dots span:nth-child(1) { background: #FF5F56; }
.dots span:nth-child(2) { background: #FFBD2E; }
.dash-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.dots span:nth-child(3) { background: #27C93F; }

.dashboard-body {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    height: 300px;
}
.dash-card { /* Added specific styling for dash-card */
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 1rem; /* Add padding */
    display: flex; /* Use flex for internal layout */
    flex-direction: column;
    justify-content: space-between;
}
.dash-card.chart {
    background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.1), transparent);
    animation: pulse-blue 4s infinite ease-in-out;
}
.dash-card.metrics {
    background: linear-gradient(to bottom right, rgba(124, 58, 237, 0.1), transparent);
    animation: pulse-purple 4s infinite ease-in-out 1s;
}
.dash-card.tasks {
    background: linear-gradient(to bottom right, rgba(255, 165, 0, 0.1), transparent); /* Changed to orange for notifications */
    animation: pulse-cyan 4s infinite ease-in-out 2s;
}
.dash-card.calendar {
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), transparent);
}

.dash-card .card-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.dash-card .card-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}
.dash-card .card-graph .line-chart path,
.demo-chart-large .complex-line-chart path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}
.dash-card .card-graph .line-chart {
    width: 100%;
    height: 50px;
    margin-top: 1rem;
}
.dash-card .card-progress {
    margin-top: 1rem;
}
.dash-card .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}
.dash-card .progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--gradient-blue), var(--gradient-purple));
    border-radius: 4px;
    transition: width 1s ease-out;
}
.dash-card .progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: block;
}

.dash-card .card-list-item span:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dash-card .card-list-item svg {
    color: var(--text-secondary);
}

.dash-card .card-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}
/* Removed specific animation delays from here, will apply to specific cards */

@keyframes pulse-blue {
    0% { background-color: rgba(59, 130, 246, 0.05); }
    50% { background-color: rgba(59, 130, 246, 0.15); }
    100% { background-color: rgba(59, 130, 246, 0.05); }
}
@keyframes pulse-purple {
    0% { background-color: rgba(124, 58, 237, 0.05); }
    50% { background-color: rgba(124, 58, 237, 0.15); }
    100% { background-color: rgba(124, 58, 237, 0.05); }
}
@keyframes pulse-cyan {
    0% { background-color: rgba(255, 165, 0, 0.05); } /* Orange pulse for notifications */
    50% { background-color: rgba(255, 165, 0, 0.15); }
    100% { background-color: rgba(255, 165, 0, 0.05); }
}
@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* ===== CLIENT LOGOS ===== */
#clients {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
#clients p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.logos-marquee {
    width: 100%;
    overflow: hidden;
    display: flex;
    white-space: nowrap;
}
.logos-slide {
    display: flex;
    animation: marquee 20s linear infinite;
}
.logos-slide span {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 0 3rem;
}
@keyframes marquee {
    from { transform: translateX(0%); }
    to { transform: translateX(-100%); }
}

/* ===== FEATURES ===== */
#features {
    padding: 8rem 0;
}
.features-container h2 {
    grid-area: title;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem; /* Adjusted margin */
}
.features-container { /* Adjusted layout for features */
    display: grid;
    grid-template-areas:
        "title title"
        "tabs  content";
    grid-template-columns: 250px 1fr;
    gap: 2rem 4rem; /* row-gap column-gap */
    align-items: start;
}
.features-tabs {
    grid-area: tabs;
    position: sticky; /* Make tabs sticky */
    top: 120px; /* Adjust based on header height */
    align-self: start; /* Ensure it sticks to the top of its grid area */
}
.features-tabs ul li {
    padding: 1rem 1.5rem; /* Increased padding for better click area */
    cursor: pointer;
    border-radius: 8px; /* Added border-radius */
    color: var(--text-secondary);
    transition: all .3s ease;
    border-left: 2px solid transparent;
}
.features-tabs ul li:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.features-tabs ul li.active {
    color: var(--text-primary);
    border-left: 2px solid var(--gradient-blue); /* Kept active border */
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), transparent);
}
.features-content {
    grid-area: content;
    display: block;
    min-height: 450px;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; /* Added transform to transition */
    padding-right: 0;
    transform: translateY(0); /* Initial state for transform transition */
}
.feature-panes-wrapper {
    /* This is now a grid item */
}
.feature-pane {
    display: none;
}
.feature-pane.active {
    display: block;
    /* Animation is now on the parent .features-content */
}
.feature-pane .feature-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.feature-pane .feature-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 45ch; /* Improve readability */
}
.feature-pane .feature-text ul { /* Styled feature list */
    list-style: none; /* Removed default list style */
    padding-left: 0;
    margin-bottom: 1.5rem;
}
.feature-pane .feature-text ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.feature-pane .feature-text ul li svg { /* Style for Lucide icons in feature list */
    color: var(--gradient-blue);
    flex-shrink: 0;
}
.feature-pane.active .feature-text ul li {
    opacity: 1;
    transform: translateX(0);
}
.feature-pane.active .feature-text ul li:nth-child(1) { transition-delay: 0.2s; }
.feature-pane.active .feature-text ul li:nth-child(2) { transition-delay: 0.3s; }
.feature-pane.active .feature-text ul li:nth-child(3) { transition-delay: 0.4s; }
.feature-pane.active .feature-text ul li:nth-child(4) { transition-delay: 0.5s; }

.feature-image-display {
    /* This element is now completely removed from the HTML */
    display: none; /* Explicitly hide the image display */
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== PRODUCT DEMO ===== */
#product-demo {
    padding: 8rem 0;
    text-align: center;
    position: relative; /* For tracer positioning */
    overflow: hidden; /* To contain tracers */
}
#product-demo h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
#product-demo p {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 4rem;
    font-size: 1.1rem;
}
.tracer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}
.tracer-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawTracer 15s linear infinite;
}
.tracer-path-2 {
    animation-delay: -7.5s; /* Offset the second path's animation */
}
.demo-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5);
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    min-height: 500px;
    position: relative;
    overflow: hidden; /* Ensure content doesn't spill */
    box-shadow: 0 20px 60px rgba(0,0,0,0.4); /* Stronger shadow for depth */
}
.demo-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05), transparent 70%);
    opacity: 0.5;
    animation: pulseGradient 10s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes pulseGradient {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0.7; }
}
.demo-dashboard::after { /* Subtle grid pattern */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}
@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.demo-main-content {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.demo-chart-large {
    height: 250px; /* Increased height */
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align chart to bottom */
        animation: chartGrow 1.5s ease-out forwards; /* Adjusted animation duration */
}
.demo-chart-large h4 { text-align: left; margin-bottom: 0.5rem; }
.demo-chart-large .complex-line-chart { width: 100%; height: 180px; }
.demo-chart-large .complex-line-chart .chart-fill {
    opacity: 0;
    animation: fillIn 1s ease-out 1.5s forwards;
}
@keyframes fillIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.demo-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.demo-metric-card {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
}
.demo-metric-card h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.demo-metric-card p {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.demo-sidebar {
    background: rgba(255,255,255,0.05); /* Slightly darker for contrast */
    border-radius: 8px;
    padding: 1.5rem;
    position: relative; /* Added for pseudo-element */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid rgba(255,255,255,0.08); /* Added border */
}
.demo-timeline-item {
    display: flex; /* Kept flex for timeline item */
    gap: 1rem;
    align-items: center;
    text-align: left; /* Kept text alignment */
    padding: 0.75rem 0;
    opacity: 0; /* Hidden by default for staggered reveal */
    transform: translateY(20px); /* Start slightly below */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--delay); /* Use custom property for staggered delay */
    border-bottom: 1px dashed rgba(255,255,255,0.05); /* Dashed separator */
}
.demo-timeline-item:last-child {
    border-bottom: none;
}
.demo-timeline-item .icon {
    display: none; /* Replaced with icon-wrapper */
}
.demo-timeline-item .icon-wrapper {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; justify-content: center; align-items: center;
}
.demo-timeline-item .text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.demo-timeline-item .text strong {
    color: var(--text-primary);
}
/* Specific timeline item animations */
.demo-timeline-item.new-deal .icon-wrapper { background: rgba(124, 58, 237, 0.15); }
.demo-timeline-item.report-generated .icon-wrapper { background: rgba(6, 182, 212, 0.15); }
.demo-timeline-item.new-user .icon-wrapper { background: rgba(59, 130, 246, 0.15); }

@keyframes chartGrow {
    from { transform: scaleX(0); transform-origin: left; opacity: 0; }
    to { transform: scaleX(1); transform-origin: left; opacity: 1; }
}
@keyframes fadeInPath {
    from { stroke-dashoffset: 1000; }
    /* This keyframe is now replaced by drawLine */
    to { stroke-dashoffset: 0; }
}
@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5)); }
    100% { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3)); }
}
@keyframes drawTracer {
    to {
        stroke-dashoffset: -1000;
    }
}

@keyframes chartGrow {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); transform-origin: left; }
}

/* ===== SUCCESS CASES ===== */
#success-cases {
    padding: 8rem 0;
}
#success-cases h2 { text-align: center; font-size: 2.5rem; margin-bottom: 4rem; }
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.case-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); /* Softer shadow */
    transition: all 0.3s ease; /* Added transition for card */
}
.case-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at var(--x) var(--y), rgba(255,255,255,0.08), transparent 40%);
    opacity: 0; /* Hidden by default */
    transition: opacity .4s;
    pointer-events: none;
}
.case-card:hover::before { opacity: 1; }
/* ===== INTEGRATIONS ===== */
#integrations-grid {
    padding: 4rem 0;
}
#integrations-grid .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.integration-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative; /* For hover effect */
    overflow: hidden; /* For hover effect */
}
.integration-card::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    transform: translate(-50%, -50%) scale(0);
    width: 200%;
    padding-top: 200%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}
.integration-card:hover {
    border-color: var(--gradient-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-5px);
}

.integration-card:hover::before {
    transform: translate(-50%, -50%) scale(1);
}
.case-card h3 {
    font-size: 3.5rem;
    background: linear-gradient(to right, var(--gradient-blue), var(--gradient-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}
.case-card h3 span { font-family: var(--font-secondary); }
.case-card p { /* Adjusted case card paragraph */
    color: var(--text-secondary);
    font-size: 1.1rem;
}
.case-card .case-footer { /* Added style for case footer */
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== PRICING ===== */
#pricing { padding: 8rem 0; text-align: center; }
#pricing h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.pricing-toggle { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 2rem 0; }
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--card-color); border: 1px solid var(--border-color);
    transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--gradient-blue); }
input:checked + .slider:before { transform: translateX(26px); }

.pricing-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    align-items: start;
}
.plan {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: left;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); /* Softer shadow */
    transition: all 0.3s ease;
}
.plan:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.plan.recommended {
    border-color: var(--gradient-blue);
    position: relative;
}
.plan.recommended:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.25);
}
.badge {
    position: absolute;
    top: -15px;
    left: 50%; /* Center the badge */
    transform: translateX(-50%); /* Adjust for centering */
    background: var(--gradient-blue);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap; /* Prevent text wrapping */
}
.plan.recommended .badge {
    left: 50%;
    right: auto;
}
.plan h3 { font-size: 1.5rem; }
.plan p { color: var(--text-secondary); margin: 0.5rem 0 1.5rem; } /* Adjusted margin */
.price { font-size: 2.5rem; font-family: var(--font-secondary); margin-bottom: 1.5rem; } /* Adjusted margin */
.price span { font-size: 3rem; font-weight: 600; } /* Added font-weight */
.price.custom span { font-size: 2rem; font-weight: 600; } /* Added font-weight */
.price.price-transition span { transition: all 0.3s ease-in-out; } /* Ensure transition is defined */
.plan .btn { width: 100%; text-align: center; }
/* ===== FAQ ===== */
#faq { padding: 8rem 0; }
#faq h2 { text-align: center; font-size: 2.5rem; margin-bottom: 4rem; }
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item {
    border-bottom: 1px solid var(--border-color);
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 1.5rem;
    font-size: 1.2rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-header .icon {
    width: 1em;
    height: 1em;
    border: 2px solid var(--text-secondary);
    border-color: rgba(255,255,255,0.3); /* Lighter border for icon */
    border-radius: 50%;
    position: relative;
    transition: transform .3s;
}
.accordion-header .icon::before,
.accordion-header .icon::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    background: var(--text-secondary); /* Color of plus/minus */
    transition: transform .3s;
}
.accordion-header .icon::before { width: 50%; height: 2px; margin-left: -25%; margin-top: -1px; }
.accordion-header .icon::after { width: 2px; height: 50%; margin-left: -1px; margin-top: -25%; }
.accordion-item.active .accordion-header .icon {
    transform: rotate(135deg);
    border-color: var(--gradient-blue); /* Active icon border color */
}
.accordion-item.active .accordion-header { color: var(--text-primary); } /* Active header text color */

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s ease-out;
}
.accordion-content p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

/* ===== PREMIUM SUPPORT ===== */
#support {
    padding: 8rem 0;
    text-align: center;
}
#support h2 {
    font-size: 2.5rem;
    margin-bottom: 4rem;
}
.support-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.support-features > div {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); /* Softer shadow */
    text-align: left;
}
.support-features h4 { margin-bottom: 0.5rem; }
.support-features p { color: var(--text-secondary); }

/* ===== FINAL CTA ===== */
#final-cta {
    padding: 8rem 0;
    text-align: center;
    background-image: radial-gradient(ellipse at top, var(--card-color) 0%, var(--bg-color) 70%),
                      radial-gradient(ellipse at bottom, var(--gradient-purple) 0%, transparent 70%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-top: 1px solid var(--border-color);
}

#final-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#final-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== FOOTER ===== */
#main-footer {
    padding: 6rem 0 2rem;
    background: #000;
    border-top: 1px solid var(--border-color);
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr;
    gap: 4rem;
    margin-bottom: 4rem;
}
.footer-about .logo-text { margin-left: 0.5rem; } /* Adjust spacing for logo text */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    /* Removed background and border-radius to show original icon shapes */
    color: var(--text-primary);
    transition: all 0.3s ease;
}
.social-links a:hover {
    /* Removed background hover effect */
    transform: scale(1.1); /* Use scale for hover effect */
}
.social-links a svg { width: 100%; height: 100%; }
.footer-about p { color: var(--text-secondary); margin: 1rem 0; }
.footer-links { display: flex; gap: 4rem; }
.link-column h4 { margin-bottom: 1rem; }
.footer-about .contact-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary); /* Ensure consistent color for contact info */
}
.footer-about .contact-info svg {
    color: var(--text-primary); /* Changed to white for maximum contrast */
    flex-shrink: 0;
}
.link-column a {
    display: block;
    display: flex; /* Make it a flex container */
    align-items: center; /* Vertically align items */
    gap: 0.75rem; /* Space between icon and text */
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: color .3s, transform .3s ease;
}
.link-column a:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}
.link-column a svg {
    width: 18px; /* Adjust icon size */
    height: 18px;
    color: var(--text-secondary); /* Default icon color */
    transition: color .3s;
}
.footer-newsletter form { display: flex; margin-top: 1rem; }
.footer-newsletter input {
    flex-grow: 1;
    padding: 12px;
    outline: none;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    color: var(--text-primary);
}
.footer-newsletter .btn { border-radius: 0 8px 8px 0; }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.legal-links { display: flex; gap: 1.5rem; }

/* ===== CHATBOT ===== */
#chatbot {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1001;
}
.chat-button {
    width: 60px;
    height: 60px;
    background-image: linear-gradient(to right, var(--gradient-blue), var(--gradient-purple));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform .3s;
}
.chat-button:hover { transform: scale(1.1); }
.chat-button svg { width: 30px; height: 30px; color: white; }

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4); /* Stronger shadow for chatbot */
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease; /* Bouncy transition */
    transform-origin: bottom right;
}
.chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}
.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-chat { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; }
.chat-body {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex; /* Added flex to align messages */
    flex-direction: column; /* Stack messages vertically */
}
.message {
    padding: 10px 15px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08); /* Default message background */
    color: var(--text-primary);
    margin-bottom: 1rem;
    max-width: 80%;
    line-height: 1.4; /* Added for better readability */
}
.message.received {
    background: rgba(255,255,255,0.1);
    border-bottom-left-radius: 5px;
    align-self: flex-start; /* Align to left */
}
.message.sent {
    background-image: linear-gradient(to right, var(--gradient-blue), var(--gradient-purple));
    color: white;
    align-self: flex-end; /* Align to right */
    border-bottom-right-radius: 5px;
}
.message.received a { /* Style links inside bot messages */
    color: var(--gradient-cyan);
    text-decoration: underline;
}
.message.received.message-options {
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.chat-option {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    width: auto; /* Override btn width if any */
}
.message a.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-weight: 500;
}
/* Typing indicator */
.typing-indicator {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
.chat-footer { display: flex; padding: 1rem; border-top: 1px solid var(--border-color); }
.chat-footer input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    outline: none;
}
.chat-footer button { background: none; border: none; cursor: pointer; }
.chat-footer button svg { width: 24px; height: 24px; color: var(--gradient-blue); }

/* ===== RESPONSIVENESS ===== */
@media (max-width: 1024px) {
    .features-container { flex-direction: column; }
    .cases-grid, .pricing-table { grid-template-columns: 1fr; }
    .plan {
        max-width: 400px;
        margin: 0 auto;
    }
    .footer-main { grid-template-columns: 1fr; }
    .footer-links { justify-content: space-between; }
    .demo-dashboard { grid-template-columns: 1fr; } /* Stack demo dashboard */
}

@media (max-width: 768px) {
    .main-menu, .menu-buttons { display: none; }
    #mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        z-index: 1001;
        cursor: pointer;
        padding: 10px;
        position: relative;
        width: 45px;
        height: 45px;
    }
    #mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: white;
        transition: all .3s ease-in-out;
        position: absolute;
        left: 10px;
    }
    #mobile-menu-toggle span:nth-child(1) { top: 12px; }
    #mobile-menu-toggle span:nth-child(2) { top: 20px; }
    #mobile-menu-toggle span:nth-child(3) { top: 28px; }

    #main-header.mobile-menu-open #mobile-menu-toggle span:nth-child(1) {
        transform: rotate(45deg);
        top: 20px;
    }
    #main-header.mobile-menu-open #mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }
    #main-header.mobile-menu-open #mobile-menu-toggle span:nth-child(3) {
        transform: rotate(-45deg);
        top: 20px;
    }

    #main-header.mobile-menu-open .menu-container,
    #main-header.mobile-menu-open .menu-buttons {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px; /* Height of scrolled header */
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-color);
        padding: 2rem;
        align-items: flex-start;
    }
    #main-header.mobile-menu-open .main-menu {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        font-size: 1.2rem;
    }
    #main-header.mobile-menu-open .menu-buttons {
        width: 100%;
        flex-direction: column;
    }
    .hero-text h1 { font-size: 2.5rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; }
}
@media (max-width: 900px) { /* Corrected media query block */
    .features-container {
        grid-template-columns: 1fr;
        grid-template-areas: "title" "tabs" "content";
    }
    .features-tabs { flex: 0 0 auto; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .reveal, .dashboard-window, .demo-chart-large, .logos-slide, .feature-pane.active, .chat-window {
        animation: none !important;
        transition: none !important;
    }
    body.no-scroll {
        overflow: hidden;
    }
}