/*
 * =====================================================
 *  NexAI Premium SaaS Theme
 *  Version 2.0 | Cinematic Motion Edition
 *  Built with GSAP, Lenis, SplitType
 * =====================================================
 *  TABLE OF CONTENTS
 *  1. Design Tokens & CSS Variables
 *  2. Lenis & Scroll Reset
 *  3. Base Typography
 *  4. Background System
 *  5. Layout Utilities
 *  6. Nav / Sidebar
 *  7. Hero Section
 *  8. Trust Strip
 *  9. Workflow Section
 * 10. Features Section
 * 11. Demo Section
 * 12. Use Cases
 * 13. Testimonials
 * 14. Pricing
 * 15. FAQ
 * 16. Final CTA
 * 17. Footer
 * 18. Shared Components (Cards, Buttons, Badges)
 * 19. Animations & Keyframes
 * 20. Responsive Breakpoints
 * =====================================================
 */

/* =====================================================
   1. DESIGN TOKENS & CSS VARIABLES
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* === Color Palette === */
    --bg-base: #020408;
    /* True black base */
    --bg-deep: #060b18;
    /* Deep navy */
    --bg-surface: #0b1120;
    /* Card surfaces */
    --bg-elevated: #111827;
    /* Elevated panels */
    --bg-card: rgba(14, 20, 38, 0.6);

    /* === Accent Colors === */
    --blue: #3b82f6;
    --blue-bright: #60a5fa;
    --violet: #8b5cf6;
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.12);
    --blue-glow: rgba(59, 130, 246, 0.12);
    --violet-glow: rgba(139, 92, 246, 0.12);

    /* === Gradient Shortcuts === */
    --gradient-brand: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    --gradient-hero:
        radial-gradient(ellipse 80% 60% at 15% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 85% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 50% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);

    /* === Text === */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: var(--blue-bright);

    /* === Typography === */
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes (fluid) */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* === Spacing === */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* === Borders & Shadows === */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-bright: rgba(255, 255, 255, 0.20);
    --border-blue: rgba(59, 130, 246, 0.3);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.8);
    --shadow-blue: 0 0 40px rgba(59, 130, 246, 0.15);
    --shadow-violet: 0 0 40px rgba(139, 92, 246, 0.15);

    /* === Radius === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;

    /* === Transitions === */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
    --duration-fast: 200ms;
    --duration-base: 350ms;
    --duration-slow: 600ms;
}

/* =====================================================
   2. LENIS & SCROLL RESET
   ===================================================== */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* =====================================================
   3. BASE TYPOGRAPHY
   ===================================================== */
body,
input,
select,
textarea {
    font-family: var(--font-body) !important;
    background-color: var(--bg-base) !important;
    background-image: none !important;
    color: var(--text-secondary);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display) !important;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
}

p {
    line-height: 1.7;
    margin: 0;
}

strong {
    font-weight: 700;
    color: var(--text-primary);
}

a {
    color: var(--blue-bright);
    text-decoration: none;
    transition: color var(--duration-fast);
}

a:hover {
    color: var(--text-primary);
}

/* =====================================================
   4. BACKGROUND SYSTEM
   ===================================================== */

/* Global ambient glow (fixed, always present) */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--gradient-hero);
}

/* Perspective grid floor / section decoration */
.grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
}

.grid-bg--perspective {
    transform: perspective(800px) rotateX(55deg) translateY(-100px) scale(2.5);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 30%, rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 30%, rgba(0, 0, 0, 1) 100%);
    opacity: 0.4;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Glow orb elements */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.glow-orb--blue {
    background: rgba(59, 130, 246, 0.25);
}

.glow-orb--violet {
    background: rgba(139, 92, 246, 0.2);
}

.glow-orb--cyan {
    background: rgba(6, 182, 212, 0.15);
}

/* =====================================================
   5. LAYOUT UTILITIES
   ===================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-8);
}

.container--sm {
    max-width: 800px;
}

.container--md {
    max-width: 1000px;
}

.container--lg {
    max-width: 1400px;
}

section.nexai-section {
    position: relative;
    padding: var(--space-32) 0;
    overflow: hidden;
    z-index: 2;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-bright);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    padding: 6px 14px;
    margin-bottom: var(--space-6);
}

.section-header {
    max-width: 700px;
    margin: 0 auto var(--space-16) auto;
    text-align: center;
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

/* =====================================================
   6. NAV / SIDEBAR OVERRIDE
   ===================================================== */
#sidebar {
    background: rgba(6, 11, 24, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-subtle) !important;
}

#sidebar .inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-8) var(--space-6) !important;
}

#sidebar .inner::before {
    content: 'NexAI';
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 800;
    letter-spacing: -0.05em;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-12);
    display: block;
}

#sidebar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

#sidebar nav ul li {
    margin-bottom: var(--space-1) !important;
}

#sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-muted) !important;
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--duration-base) var(--ease-out);
    letter-spacing: 0;
    text-transform: none !important;
}

#sidebar nav ul li a:hover,
#sidebar nav ul li a.active {
    color: var(--text-primary) !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Kill the old separator lines */
#sidebar nav ul li::before {
    display: none !important;
}

/* =====================================================
   7. HERO SECTION
   ===================================================== */
#intro.nexai-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 120px 0 80px;
    position: relative;
    z-index: 2;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-16);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    padding: 8px 18px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--blue-bright);
    margin-bottom: var(--space-6);
}

.hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.7;
    }
}

.hero-headline {
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.04em;
    max-width: 900px;
    margin-bottom: var(--space-6);
}

.hero-headline .text-gradient {
    background: linear-gradient(135deg, var(--blue-bright) 0%, var(--violet) 60%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtext {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 550px;
    line-height: 1.7;
    margin-bottom: var(--space-10);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

/* Hero Mockup */
.hero-mockup-wrap {
    width: 100%;
    max-width: 1100px;
    position: relative;
}

.hero-mockup-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.hero-mockup-frame {
    position: relative;
    z-index: 1;
    background: rgba(10, 16, 34, 0.85);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-blue);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.hero-mockup-chrome {
    height: 44px;
    background: rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    gap: 8px;
}

.chrome-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chrome-dot--red {
    background: #ef4444;
}

.chrome-dot--yellow {
    background: #eab308;
}

.chrome-dot--green {
    background: #22c55e;
}

.chrome-bar {
    flex: 1;
    height: 22px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    margin: 0 var(--space-4);
}

.hero-mockup-img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    display: block;
    filter: saturate(1.1) brightness(0.95);
}

/* Scroll indicator */
.hero-scroll-hint {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-size: var(--text-sm);
    animation: bounce-hint 2s ease-in-out infinite;
}

@keyframes bounce-hint {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* =====================================================
   8. TRUST STRIP / METRICS
   ===================================================== */
#trust {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.015);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Metrics Row */
.trust-metrics {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-16);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}

.trust-metric {
    text-align: center;
    flex-shrink: 0;
}

.trust-metric-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
    margin-bottom: var(--space-1);
}

.trust-metric-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.trust-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
    flex-shrink: 0;
}

/* Logos marquee */
.trust-logos-label {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.marquee-viewport {
    overflow: hidden;
}

.marquee-track {
    display: flex;
    gap: 0;
}

.marquee-content {
    display: flex;
    gap: var(--space-16);
    align-items: center;
    flex-shrink: 0;
    padding-right: var(--space-16);
}

.marquee-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    letter-spacing: -0.02em;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0.5;
    transition: opacity var(--duration-base);
}

.marquee-logo i {
    font-size: 1.5em;
}

.marquee-logo:hover {
    opacity: 0.9;
}

/* =====================================================
   9. WORKFLOW SECTION
   ===================================================== */
#workflow {
    background: var(--bg-deep);
    will-change: transform;
    /* Speed fix */
}

.workflow-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
    overflow: visible;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.workflow-connector {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--violet) 100%);
    margin-top: 48px;
    position: relative;
    flex-shrink: 1;
    min-width: 40px;
}

.workflow-connector::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--violet);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Pulse animation on the connector line */
.workflow-connector::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 10px var(--blue);
    animation: flow-pulse 2s ease-in-out infinite;
}

@keyframes flow-pulse {
    0% {
        left: 0%;
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    width: 200px;
}

.workflow-step-num {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-bright);
    margin-bottom: var(--space-3);
}

.workflow-step-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--blue-bright);
    margin-bottom: var(--space-4);
    position: relative;
    transition: all var(--duration-slow) var(--ease-out);
}

.workflow-step-icon::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--duration-slow);
    z-index: -1;
}

.workflow-step:hover .workflow-step-icon {
    border-color: transparent;
    box-shadow: var(--shadow-blue);
    color: white;
    transform: translateY(-4px);
}

.workflow-step:hover .workflow-step-icon::after {
    opacity: 1;
}

.workflow-step-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.workflow-step-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
}

/* =====================================================
  10. FEATURES SECTION
   ===================================================== */
#features {
    background: var(--bg-base);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: start;
}

.features-mockup-col {
    position: sticky;
    top: 120px;
}

.features-mockup-frame {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-violet);
}

.features-mockup-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    filter: saturate(1.2) brightness(0.85);
}

.features-cards-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Feature Card */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    backdrop-filter: blur(12px);
    transition: all var(--duration-slow) var(--ease-out);
    display: flex;
    gap: var(--space-4);
    cursor: default;
}

.feature-card:hover {
    border-color: var(--border-blue);
    box-shadow: var(--shadow-blue);
    transform: translateX(6px);
    background: rgba(59, 130, 246, 0.04);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--blue-bright);
    flex-shrink: 0;
    transition: all var(--duration-slow) var(--ease-out);
}

.feature-card:hover .feature-icon {
    background: var(--gradient-brand);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-blue);
}

.feature-content h3 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.feature-content p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* =====================================================
  11. DEMO SECTION
   ===================================================== */
#demo {
    background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-deep) 100%);
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-20);
    align-items: start;
}

.demo-visual-wrapper {
    position: sticky;
    top: 100px;
}

.demo-frame {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-blue);
    transition: transform var(--duration-slow) var(--ease-out);
}

.demo-chrome {
    height: 44px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    gap: 8px;
}

.demo-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    filter: saturate(1.1) brightness(0.9);
}

.demo-callout {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(59, 130, 246, 0.06);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    font-size: var(--text-sm);
    color: var(--blue-bright);
}

.demo-callout i {
    font-size: 1rem;
}

.demo-text-scroller {
    padding-top: var(--space-8);
}

.demo-step {
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--border-subtle);
    opacity: 0.3;
    transition: opacity var(--duration-slow);
}

.demo-step.active,
.demo-step:first-child {
    opacity: 1;
}

.demo-step-number {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blue-bright);
    margin-bottom: var(--space-3);
}

.demo-step h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.demo-step p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.demo-step-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--blue-bright);
}

.demo-step-link:hover {
    gap: var(--space-3);
}

/* =====================================================
  12. USE CASES
   ===================================================== */
#usecases {
    background: var(--bg-base);
}

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.usecase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    backdrop-filter: blur(12px);
    transition: all var(--duration-slow) var(--ease-out);
    overflow: hidden;
    position: relative;
}

.usecase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--duration-slow);
}

.usecase-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md), var(--shadow-blue);
    transform: translateY(-4px);
}

.usecase-card:hover::before {
    opacity: 1;
}

.usecase-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: var(--space-6);
}

.usecase-icon--blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-bright);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.usecase-icon--violet {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.usecase-icon--cyan {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.usecase-icon--green {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.usecase-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.usecase-card p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.usecase-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.usecase-benefits li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.usecase-benefits li i {
    color: var(--blue-bright);
    font-size: 0.8rem;
}

/* =====================================================
  13. TESTIMONIALS
   ===================================================== */
#testimonials {
    background: var(--bg-deep);
    overflow: hidden;
}

.testim-scroll-container {
    position: relative;
}

.testim-track-outer {
    overflow: hidden;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.testim-track {
    display: flex;
    gap: var(--space-6);
    padding: var(--space-4) 60px;
    width: max-content;
}

.testim-card {
    width: 420px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    backdrop-filter: blur(20px);
    transition: all var(--duration-slow) var(--ease-out);
}

.testim-card:hover {
    border-color: var(--border-blue);
    box-shadow: var(--shadow-blue);
    transform: translateY(-6px);
}

.testim-stars {
    display: flex;
    gap: 3px;
    margin-bottom: var(--space-5);
}

.testim-stars i {
    color: #fbbf24;
    font-size: var(--text-base);
}

.testim-quote {
    font-size: var(--text-base);
    color: var(--text-primary);
    line-height: 1.7;
    font-style: italic;
    margin-bottom: var(--space-6);
}

.testim-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.testim-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-base);
    color: white;
}

.testim-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.testim-role {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* =====================================================
  14. PRICING
   ===================================================== */
#pricing {
    background: var(--bg-base);
}

.pricing-grid {
    display: flex;
    gap: var(--space-6);
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
}

.pricing-card {
    flex: 1;
    min-width: 290px;
    max-width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    backdrop-filter: blur(16px);
    position: relative;
    transition: all var(--duration-slow) var(--ease-out);
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.pricing-card--featured {
    border-color: var(--border-blue);
    box-shadow: var(--shadow-blue);
    background: rgba(20, 30, 60, 0.6);
}

.pricing-card--featured:hover {
    box-shadow: 0 30px 80px rgba(59, 130, 246, 0.3);
}

.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-brand);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: 100px;
    white-space: nowrap;
}

.pricing-tier {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.pricing-tier--blue {
    color: var(--blue-bright);
}

.pricing-tier--violet {
    color: var(--violet);
}

.pricing-tier--cyan {
    color: var(--cyan);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.pricing-amount {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.pricing-period {
    font-size: var(--text-base);
    color: var(--text-muted);
}

.pricing-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.pricing-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-6) 0;
}

.pricing-features-list {
    list-style: none;
    margin: 0 0 var(--space-8) 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.pricing-features-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pricing-features-list li i {
    color: var(--blue-bright);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.pricing-features-list li.dimmed {
    opacity: 0.45;
}

.pricing-features-list li.dimmed i {
    color: var(--text-muted);
}

/* =====================================================
  15. FAQ
   ===================================================== */
#faq {
    background: var(--bg-deep);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: border-color var(--duration-base);
}

.faq-item.open {
    border-color: var(--border-blue);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    cursor: pointer;
    gap: var(--space-4);
}

.faq-question h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    pointer-events: none;
    letter-spacing: -0.01em;
}

.faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-bright);
    font-size: var(--text-sm);
    flex-shrink: 0;
    transition: all var(--duration-base);
}

.faq-item.open .faq-icon {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--border-blue);
}

.faq-answer-wrap {
    height: 0;
    overflow: hidden;
}

.faq-answer-inner {
    padding: 0 var(--space-6) var(--space-6) var(--space-6);
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =====================================================
  16. FINAL CTA
   ===================================================== */
#cta {
    background: var(--bg-base);
    text-align: center;
}

.cta-inner {
    position: relative;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-2xl);
    padding: var(--space-24) var(--space-8);
    overflow: hidden;
}

.cta-inner::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 60%);
    filter: blur(60px);
    pointer-events: none;
}

.cta-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-6);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-desc {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto var(--space-10) auto;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.cta-note {
    margin-top: var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* =====================================================
  17. FOOTER
   ===================================================== */
#footer {
    background: var(--bg-base) !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: var(--space-8) 0 !important;
}

#footer .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-8);
}

.footer-brand {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 800;
    letter-spacing: -0.05em;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: var(--space-6);
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: color var(--duration-fast);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* =====================================================
  18. SHARED COMPONENTS
   ===================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff !important;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.4);
    color: #fff !important;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-medium) !important;
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--border-bright) !important;
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 40px;
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge--blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-bright);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge--violet {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge--green {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Text gradient utility */
.text-gradient {
    background: linear-gradient(135deg, var(--blue-bright) 0%, var(--violet) 50%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

/* Section separator glow line */
.section-glow-line {
    width: 60px;
    height: 3px;
    background: var(--gradient-brand);
    border-radius: 2px;
    margin: var(--space-4) auto 0;
}

/* GSAP clip helper */
.clip-parent {
    overflow: hidden;
}

.char {
    display: inline-block;
    will-change: transform;
}

/* Hyperspace overrides to kill conflicts */
.wrapper.style1,
.wrapper.style2,
.wrapper.style3,
.wrapper.style1-alt,
.wrapper.style2-alt {
    background: transparent !important;
}

.fade-up.inactive,
.spotlights>section.inactive,
.features.inactive,
.style1.inactive,
.style2.inactive,
.style3.inactive {
    opacity: 1 !important;
    transform: none !important;
}

#wrapper {
    overflow: visible;
    width: 100%;
}

/* =====================================================
  19. ANIMATIONS & KEYFRAMES
   ===================================================== */

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.6;
        filter: blur(80px);
    }

    50% {
        opacity: 1.0;
        filter: blur(100px);
    }
}

.animate-float {
    animation: float-y 6s ease-in-out infinite;
}

.animate-glow {
    animation: glow-pulse 4s ease-in-out infinite;
}

/* =====================================================
  20. RESPONSIVE BREAKPOINTS (Mobile first)
   ===================================================== */

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .features-mockup-col {
        position: static;
    }

    .demo-container {
        grid-template-columns: 1fr;
    }

    .demo-visual-wrapper {
        position: static;
    }

    .workflow-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-8);
    }

    .workflow-connector {
        display: none;
    }

    .workflow-step {
        width: 180px;
    }

    .pricing-grid {
        flex-direction: column;
        align-items: center;
    }

    .pricing-card {
        max-width: 480px;
        width: 100%;
    }
}

/* Mobile ≤ 768px */
@media (max-width: 768px) {
    section.nexai-section {
        padding: var(--space-20) 0;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .hero-headline {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-mockup-img {
        height: 280px;
    }

    .features-mockup-img {
        height: 280px;
    }

    .trust-metrics {
        gap: var(--space-6);
    }

    .trust-divider {
        display: none;
    }

    .usecases-grid {
        grid-template-columns: 1fr;
    }

    .testim-card {
        width: 320px;
    }

    .cta-inner {
        padding: var(--space-16) var(--space-6);
    }

    .cta-headline {
        font-size: var(--text-3xl);
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    #footer .inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Tiny mobile ≤ 480px */
@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .pricing-card {
        padding: var(--space-6);
    }
}