/* ===== BASE STYLES ===== */
/* CSS variables for consistent theming */
:root {
    --primary: #4a6cf7;       /* Main brand color */
    --primary-dark: #3a56d8;  /* Darker variant for interactions */
    --secondary: #f8fafc;     /* Background color */
    --text: #334155;          /* Primary text color */
    --text-light: #64748b;    /* Secondary text color */
    --white: #ffffff;         /* White color */
    --accent: #10b981;        /* Accent color */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Default shadow */
    --transition: all 0.3s ease; /* Default transition */
}

/* Global reset and box sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base body styles */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Heading styles */
h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

/* Container for content centering */
.container {
    width: 90%;
    max-width: 1200px; /* Maximum content width */
    margin: 0 auto; /* Horizontal centering */
}

/* Responsive image handling */
img {
    max-width: 100%;
    height: auto;
}

/* Link styling */
a {
    text-decoration: none;
    color: inherit;
}

/* ===== COMPONENT STYLES ===== */
/* Primary button styling */
.cta-btn {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

/* Button hover effects */
.cta-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px); /* Lift effect */
    box-shadow: var(--shadow);
}

/* Header styling with sticky behavior */
.header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.2rem 0;
    z-index: 1000; /* Ensure header stays on top */
    transition: var(--transition);
}

/* Header in sticky state */
.header.sticky {
    padding: 0.8rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Header layout */
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo styling */
.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Navigation styling */
.nav {
    display: flex;
    gap: 2rem;
    transition: var(--transition);
}

/* Navigation link hover effect */
.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

/* Mobile menu toggle button */
.menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    transition: var(--transition);
    z-index: 1002; /* Above other elements */
}

/* Hero section layout */
.hero {
    padding: 4rem 0 2rem;
    min-height: 85vh; /* Minimum viewport height */
    display: flex;
    align-items: center;
}

/* Hero content styling */
.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    line-height: 1.1;
}

/* Trusted companies section */
.trusted {
    background-color: #f9fafe;
    padding: 3rem 0;
    text-align: center;
}

/* Features grid layout */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three-column grid */
    gap: 2rem;
}

/* Feature card hover effect */
.feature-card:hover {
    transform: translateY(-10px); /* Lift effect */
}

/* Process steps layout */
.steps-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    position: relative;
}

/* Integrations section with floating animation */
.integration-card {
    animation: float 6s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 0.5s); /* Staggered delay */
}

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

/* Testimonial carousel styling */
.testimonial-carousel {
    display: flex;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform; /* Optimize animations */
}

/* FAQ accordion styling */
.faq-answer {
    max-height: 0; /* Collapsed by default */
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8fafc;
}

/* Footer layout */
.footer .container {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

/* Scroll-to-top button styling */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    opacity: 0; /* Hidden by default */
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 99; /* Above page content */
}

/* Animation classes for scroll effects */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Tablet styles */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* Two-column grid */
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Mobile menu layout */
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        z-index: 1001;
        gap: 1.5rem;
    }

    /* Hero section mobile layout */
    .hero .container {
        flex-direction: column-reverse; /* Image above text */
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .hero {
        min-height: calc(100vh - 70px); /* Adjust for header height */
    }
}