/* Screen reader only — visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #000000;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: #808080;
    --accent-blue: #4a9eff;
    --accent-white: #ffffff;
    --grid-color: rgba(255, 255, 255, 0.03);
    --wireframe-color: rgba(74, 158, 255, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}

/* Font loading optimization - prevent layout shift */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    font-weight: 400;
}
@font-face {
    font-family: 'Inter';
    font-display: swap;
    font-weight: 600;
}
@font-face {
    font-family: 'Inter';
    font-display: swap;
    font-weight: 700;
}
@font-face {
    font-family: 'Space Mono';
    font-display: swap;
    font-weight: 700;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(74, 158, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.2s ease, border-color 0.2s ease;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.3);
    border-color: var(--accent-blue);
}

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.custom-cursor-dot.hover {
    background: var(--accent-purple);
}

/* Hide custom cursor on mobile */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Remove transform to prevent CLS - use opacity only */
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    /* Force GPU acceleration without layout shift */
    will-change: opacity;
    transform: translateZ(0);
}

.navbar.visible {
    opacity: 1;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo svg {
    filter: drop-shadow(0 4px 12px rgba(133, 88, 237, 0.3));
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 15px;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-links a {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.1);
    transform: translateY(-2px);
}

.social-links svg {
    width: 18px;
    height: 18px;
}

.cta-button {
    background: transparent;
    color: var(--text-primary);
    padding: 14px 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 16px;
    white-space: nowrap;
}

.cta-button:hover {
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    transition: 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    /* Explicit height to prevent layout shift on mobile */
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 0 80px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            var(--grid-color) 50px,
            var(--grid-color) 51px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            var(--grid-color) 50px,
            var(--grid-color) 51px
        );
}

#three-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Prevent layout shift - reserve minimum space */
    min-height: 100vh;
}

#three-container canvas {
    display: block;
    /* Explicit dimensions to prevent CLS */
    width: 100% !important;
    height: 100% !important;
}

/* Language Toggle */
.language-toggle {
    position: absolute;
    top: 32px;
    right: 32px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 8px 16px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-toggle:hover {
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.2);
}

.lang-option {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    cursor: pointer;
}

.lang-option.active {
    color: var(--text-primary);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 8px;
}

/* Hero Overlay Layout */
.hero-overlay {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 48px;
}

.hero-content-center {
    max-width: 900px;
    text-align: center;
    /* Reduced animation time for faster LCP */
    animation: fadeInUp 0.6s ease-out forwards;
    /* Start with slight opacity to prevent harsh CLS */
    opacity: 0.05;
    /* Use content-visibility for performance */
    content-visibility: auto;
}

.hero-title {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin-bottom: 24px;
    /* Optimize for LCP - faster rendering */
    text-rendering: optimizeSpeed;
    /* Contain layout to prevent shifts */
    contain: layout style;
    /* Ensure visibility during font loading */
    font-display: swap;
}

.hero-description {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 0;
    animation: fadeInScale 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.initialize-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: transparent;
    backdrop-filter: blur(10px);
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.5s ease;
    text-decoration: none;
    font-weight: 600;
}

.initialize-button:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.pulse-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeIn 1s ease-out 1.5s forwards;
    opacity: 0;
}

.scroll-text {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
    animation: scrollMove 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes scrollMove {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Removed old hero circle styles */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 80px;
}

.primary-button {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 16px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--text-primary);
}

.primary-button:hover {
    background: transparent;
    color: var(--text-primary);
}

.secondary-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 16px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 900;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 140px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 999;
    backdrop-filter: blur(10px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.4);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-blue);
    transition: stroke 0.3s ease;
}

.back-to-top:hover svg {
    stroke: var(--bg-primary);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 160px;  /* Moved higher to avoid chatbot overlap */
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ElevenLabs Chatbot Widget - Minimal styling to reduce layout shift */
elevenlabs-convai {
    /* Let widget control its own sizing, just ensure it's isolated */
    contain: layout;
    /* Prevent pointer events on the container itself */
    pointer-events: none;
}

elevenlabs-convai * {
    /* Re-enable pointer events for widget contents */
    pointer-events: auto;
}

/* Sections */
section {
    padding: 120px 0;
    position: relative;
}

/* Scroll Animations - Optimized to prevent CLS */
.scroll-reveal {
    opacity: 0;
    /* Use transform3d for GPU acceleration without layout shift */
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Force compositing layer to prevent layout recalculation */
    will-change: transform, opacity;
    /* Reserve space to prevent CLS */
    min-height: 1px;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
    transition: opacity 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
    min-height: 1px;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translate3d(30px, 0, 0);
    transition: opacity 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
    min-height: 1px;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Animation classes for AnimationObserver - Desktop only */
.animate-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
}

.service-card:hover {
    border-color: rgba(74, 158, 255, 0.4);
    background: rgba(255, 255, 255, 0.02);
}

.service-card.featured {
    background: rgba(74, 158, 255, 0.05);
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-blue);
    color: var(--bg-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.gradient-purple,
.gradient-cyan,
.gradient-orange,
.gradient-green {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    color: var(--accent-blue);
}

.service-card h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.service-features {
    list-style: none;
}

.service-features li {
    color: var(--text-secondary);
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    font-size: 15px;
}

.service-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-purple);
    font-weight: bold;
}

/* Testimonials */
.testimonials {
    padding: 120px 0;
    background: var(--bg-primary);
    overflow: hidden;
}


.testimonials-grid {
    display: flex;
    gap: 32px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(133, 88, 237, 0.3);
    background: rgba(255, 255, 255, 0.05);
}


@media (max-width: 1200px) {
    .testimonials-grid {
        flex-direction: column;
    }
}


.testimonial-rating {
    font-size: 20px;
}

.testimonial-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    flex: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.author-info h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.author-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* FAQ Section */
.faq {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 800px;
    margin: 60px auto 0;
}

.faq-item {
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(133, 88, 237, 0.3);
}

.faq-item.active {
    border-color: rgba(74, 158, 255, 0.4);
    background: rgba(74, 158, 255, 0.05);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--accent-purple);
}

.faq-icon {
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1),
                color 0.3s ease;
    color: var(--accent-purple);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--accent-blue);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.65, 0, 0.35, 1),
                padding 0.4s cubic-bezier(0.65, 0, 0.35, 1),
                opacity 0.3s ease;
    padding: 0 24px;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 20px 24px 24px;
    opacity: 1;
    transition: max-height 0.5s cubic-bezier(0.65, 0, 0.35, 1),
                padding 0.5s cubic-bezier(0.65, 0, 0.35, 1),
                opacity 0.4s ease 0.1s;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    margin: 0;
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how-it-works {
    background: var(--bg-primary);
}

.hiw-steps {
    display: flex;
    flex-direction: column;
    max-width: 760px;
    margin: 0 auto;
}

.hiw-step {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    align-items: start;
    padding: 48px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.hiw-step:last-child {
    border-bottom: none;
}

.hiw-step-number {
    font-size: 3.5rem;
    font-weight: 900;
    font-family: 'Space Mono', monospace;
    color: rgba(74, 158, 255, 0.18);
    line-height: 1;
    padding-top: 4px;
    user-select: none;
}

.hiw-step-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hiw-step-content p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .hiw-step {
        grid-template-columns: 48px 1fr;
        gap: 1rem;
        padding: 28px 0;
    }

    .hiw-step-number {
        font-size: 2.25rem;
    }

    .hiw-step-content h3 {
        font-size: 1.1rem;
    }
}

/* Mobile hint in persona demo */
.persona-mobile-hint {
    display: none;
}

@media (max-width: 768px) {
    .persona-mobile-hint {
        display: block;
        text-align: center;
        color: var(--text-secondary);
        font-size: 0.875rem;
        line-height: 1.5;
        padding: 0.75rem 1rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        margin-bottom: 1.5rem;
    }
}

/* Case Studies */
.cases {
    background: var(--bg-secondary);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.case-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.case-card:hover {
    border-color: rgba(74, 158, 255, 0.4);
    background: rgba(255, 255, 255, 0.02);
}

.case-image {
    height: 220px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.case-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.15) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.form-message {
    margin-top: 24px;
    padding: 20px;
    background: rgba(75, 255, 192, 0.1);
    border: 1px solid rgba(75, 255, 192, 0.3);
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.form-message p {
    color: #4BFFC0;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.case-card:nth-child(2) .case-image {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.case-card:nth-child(3) .case-image {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.case-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.case-icon svg {
    color: var(--accent-blue);
}

.case-content {
    padding: 32px;
}

.case-content h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.case-industry {
    color: var(--accent-purple);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.case-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.case-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-value {
    font-size: 32px;
    font-weight: 900;
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 17px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

.about-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.about-feature svg {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
    flex-shrink: 0;
    margin-top: 4px;
}

.about-feature h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.about-feature p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.about-visual {
    display: grid;
    gap: 20px;
}

.visual-card {
    background: linear-gradient(135deg, rgba(133, 88, 237, 0.1) 0%, rgba(75, 255, 192, 0.05) 100%);
    border: 1px solid rgba(133, 88, 237, 0.2);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.visual-card:hover {
    transform: translateY(-4px);
    border-color: rgba(133, 88, 237, 0.4);
}

.visual-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(133, 88, 237, 0.1);
    border: 1px solid rgba(133, 88, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    transition: all 0.3s ease;
}

.visual-card:hover .visual-icon {
    background: rgba(133, 88, 237, 0.2);
    transform: scale(1.05);
}

.visual-card:nth-child(2) .visual-icon {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: rgb(6, 182, 212);
}

.visual-card:nth-child(3) .visual-icon {
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.3);
    color: rgb(251, 146, 60);
}

.visual-number {
    font-size: 48px;
    font-weight: 900;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.visual-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

/* CTA Section */
.cta {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-title {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.cta-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 60px;
    line-height: 1.7;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form input.error,
.contact-form select.error,
.contact-form textarea.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.contact-form input.success,
.contact-form select.success,
.contact-form textarea.success {
    border-color: #22c55e;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-field-error {
    display: none;
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    padding-left: 4px;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.contact-form select option {
    background: #1a1a1a;
    color: white;
    padding: 12px;
    font-size: 15px;
}

.submit-button {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: transparent;
    color: var(--text-primary);
}

/* Footer */
@keyframes footerAurora {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.6; }
    50%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1;   }
    100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.6; }
}

.footer {
    background: var(--bg-primary);
    padding: 72px 0 40px;
    position: relative;
    overflow: hidden;
    /* Dot grid */
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Aurora blobs */
.footer::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 15%;
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(192, 132, 252, 0.12) 0%, transparent 65%);
    pointer-events: none;
    animation: footerAurora 8s ease-in-out infinite;
}

.footer::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 400px;
    height: 280px;
    background: radial-gradient(ellipse, rgba(34, 211, 238, 0.08) 0%, transparent 65%);
    pointer-events: none;
    animation: footerAurora 10s ease-in-out infinite reverse;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    line-height: 1.7;
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: rgba(192, 132, 252, 0.12);
    border-color: rgba(192, 132, 252, 0.4);
    color: #c084fc;
}

.footer-column h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #c084fc;
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-contact-list li svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.footer-contact-list a {
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 56px;
    }

    .section-title {
        font-size: 42px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 768px) {
    /* CRITICAL: Mobile performance optimizations to reduce CLS */

    /* Disable ALL animations and transitions on mobile EXCEPT hero background */
    *, *::before, *::after {
        animation: none !important;
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        transition: none !important;
        transition-duration: 0s !important;
    }

    /* Allow hero background animations on mobile */
    .hero::before,
    .hero::after {
        animation-duration: 15s !important;
    }

    /* Disable animations on mobile for faster LCP but ensure visibility */
    .hero-content-center {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    /* Force navbar dimensions to prevent CLS */
    .navbar {
        height: 70px;
        min-height: 70px;
    }

    .nav-content {
        height: 70px;
    }

    .logo {
        min-width: 100px;
        height: 40px;
    }

    /* Force hero height to prevent layout shift */
    .hero {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        padding: 100px 20px 60px;
        overflow: hidden;
    }

    /* Hide Three.js container completely on mobile */
    #three-container {
        display: none !important;
    }

    /* Mobile-only: Beautiful animated gradient background for hero */
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        background:
            radial-gradient(circle at 20% 30%, rgba(74, 158, 255, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(133, 88, 237, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 40% 80%, rgba(75, 255, 192, 0.1) 0%, transparent 50%),
            linear-gradient(135deg, #0a0a0a 0%, #000000 100%);
        animation: gradientShift 15s ease infinite !important;
    }

    /* Animated gradient keyframes for mobile */
    @keyframes gradientShift {
        0%, 100% {
            background:
                radial-gradient(circle at 20% 30%, rgba(74, 158, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(133, 88, 237, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(75, 255, 192, 0.1) 0%, transparent 50%),
                linear-gradient(135deg, #0a0a0a 0%, #000000 100%);
        }
        33% {
            background:
                radial-gradient(circle at 70% 40%, rgba(74, 158, 255, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 30% 80%, rgba(133, 88, 237, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 60% 20%, rgba(75, 255, 192, 0.12) 0%, transparent 50%),
                linear-gradient(135deg, #0a0a0a 0%, #000000 100%);
        }
        66% {
            background:
                radial-gradient(circle at 50% 70%, rgba(74, 158, 255, 0.18) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(133, 88, 237, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 20% 60%, rgba(75, 255, 192, 0.1) 0%, transparent 50%),
                linear-gradient(135deg, #0a0a0a 0%, #000000 100%);
        }
    }

    /* CSS-only subtle particle effect using pseudo-elements */
    .hero::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        background-image:
            radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.15), transparent),
            radial-gradient(2px 2px at 60% 70%, rgba(74, 158, 255, 0.2), transparent),
            radial-gradient(1px 1px at 50% 50%, rgba(133, 88, 237, 0.15), transparent),
            radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.1), transparent),
            radial-gradient(2px 2px at 90% 60%, rgba(75, 255, 192, 0.15), transparent),
            radial-gradient(1px 1px at 33% 90%, rgba(74, 158, 255, 0.15), transparent),
            radial-gradient(1px 1px at 15% 80%, rgba(255, 255, 255, 0.1), transparent);
        background-size: 200% 200%;
        background-position: 0% 0%;
        animation: particleFloat 20s ease infinite !important;
        pointer-events: none;
    }

    @keyframes particleFloat {
        0%, 100% {
            background-position: 0% 0%;
            opacity: 0.6;
        }
        50% {
            background-position: 100% 100%;
            opacity: 0.8;
        }
    }

    /* Force hero overlay to be stable and above background - CRITICAL for CLS */
    .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        min-height: 100vh;
        height: 100vh;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 80px 20px 60px;
    }

    /* Force hero content to have fixed dimensions */
    .hero-content-center {
        width: 100%;
        max-width: 100%;
        opacity: 1 !important;
        transform: none !important;
    }

    /* Disable scroll reveal animations on mobile to prevent CLS */
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Disable animation observer classes on mobile */
    .animate-hidden {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Force service cards to be visible */
    .service-card,
    .case-card,
    .about-feature,
    .visual-card {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Prevent font-related CLS */
    .hero-title,
    .hero-description,
    .section-title,
    .section-subtitle {
        font-display: swap;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-right {
        gap: 12px;
    }

    .social-links {
        gap: 12px;
    }

    .social-links a {
        width: 32px;
        height: 32px;
    }

    .social-links svg {
        width: 16px;
        height: 16px;
    }

    /* Hide navbar CTA button on mobile - too long text */
    .nav-right .cta-button {
        display: none;
    }

    /* Hero Responsive */
    .hero-overlay {
        padding: 40px 20px;
    }

    .hero-title {
        font-size: clamp(32px, 8vw, 48px);
        margin-bottom: 20px;
        /* Prevent layout shift from font loading */
        min-height: 140px;
        line-height: 1.1;
    }

    .hero-description {
        font-size: clamp(14px, 4vw, 18px);
        margin-bottom: 32px;
        /* Prevent layout shift */
        min-height: 100px;
        line-height: 1.5;
    }

    .initialize-button {
        padding: 16px 28px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-align: center;
        justify-content: center;
    }

    .language-toggle {
        top: 20px;
        right: 20px;
        padding: 6px 12px;
        font-size: 10px;
    }

    .scroll-indicator {
        bottom: 24px;
    }

    .hero-cta-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 10px;
        /* CRITICAL: Force button to be visible on mobile (animations are disabled) */
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-cta-buttons .initialize-button {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        /* Ensure button is visible and above background */
        opacity: 1 !important;
        z-index: 20;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 36px;
    }

    .cta-title {
        font-size: 36px;
    }

    .services-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }


    section {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-title {
        font-size: 28px;
    }

    .service-card,
    .case-card {
        padding: 24px;
    }
}

/* ===================================== */
/* LEAD CAPTURE MODAL */
/* ===================================== */

/* Overlay */
.lead-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lead-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.lead-modal {
    position: fixed;
    right: -100%;
    top: 0;
    height: 100vh;
    width: min(500px, 100vw);
    background: var(--bg-card);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    transition: right 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.lead-modal-overlay.visible .lead-modal {
    right: 0;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2;
}

/* Modal Content */
.modal-content {
    padding: 80px 40px 40px;
    flex: 1;
}

.modal-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content > p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Lead Form */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lead-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead-form label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.lead-form input,
.lead-form select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.lead-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.lead-form select option {
    background: var(--bg-card);
    color: #fff;
}

.lead-form input:focus,
.lead-form select:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.08);
}

.lead-form input.error,
.lead-form select.error {
    border-color: #ff4444;
}

.lead-form .form-error {
    font-size: 13px;
    color: #ff4444;
    display: none;
    margin-top: -4px;
}

.lead-form .submit-button {
    margin-top: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lead-form .submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(100, 80, 255, 0.4);
}

.lead-form .submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    stroke: #4BFFC0;
    stroke-width: 2;
    animation: checkmark 0.6s ease;
}

.success-message h3 {
    font-size: 28px;
    font-weight: 700;
    color: #4BFFC0;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-45deg);
    }
    50% {
        transform: scale(1.1) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Mobile Responsive - Lead Modal */
@media (max-width: 768px) {
    .lead-modal {
        width: 100vw;
    }

    .modal-content {
        padding: 60px 20px 30px;
    }

    .modal-content h2 {
        font-size: 26px;
    }

    .modal-content > p {
        font-size: 15px;
    }
}

/* ============================================
   PERSONA DEMO SECTION
   ============================================ */

.persona-demo {
    background: linear-gradient(180deg, #0a0a0f 0%, #0d0d1a 50%, #0a0a0f 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.persona-demo .section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a78bfa;
    margin-bottom: 1rem;
}

/* Desktop: 3-column grid */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

/* Blob slot — Three.js render target with persona color pool behind robot */
.persona-blob-slot {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 300px;
    position: relative;
    z-index: 1;
    /* Soft color directly behind the robot — canvas is transparent so this shows */
    background: radial-gradient(
        ellipse at 50% 58%,
        rgba(var(--persona-color-rgb), 0.18) 0%,
        rgba(var(--persona-color-rgb), 0.06) 50%,
        transparent 75%
    );
}

/* Restore clip during loading (shimmer needs overflow:hidden) */
.persona-blob-slot.is-loading {
    overflow: hidden;
    border-radius: 12px;
}

/* Loading shimmer — visible before Spline scene loads */
.persona-blob-slot.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.04) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: spline-shimmer 1.6s ease-in-out infinite;
    border-radius: 16px;
    pointer-events: none;
}
@keyframes spline-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* Hide Spline watermark — CSS backup (JS also hides it) */
.persona-blob-slot > a,
.persona-blob-slot a[href*="spline"],
.persona-blob-slot [class*="watermark"],
.persona-blob-slot [class*="logo"] {
    display: none !important;
}

/* Persona card — click target, no visible card boundary */
.persona-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    position: relative;
}

/* Atmospheric halo — blurred ellipse behind the robot in persona color */
.persona-card::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at 50% 55%,
        rgba(var(--persona-color-rgb), 0.45) 0%,
        rgba(var(--persona-color-rgb), 0.18) 45%,
        transparent 72%
    );
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.persona-card:hover::before {
    opacity: 1;
    filter: blur(10px);
}

/* Persona info */
.persona-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.persona-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
}

.persona-industry {
    font-size: 0.875rem;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Responsive show/hide */
@media (max-width: 768px) {
    .persona-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Carousel no longer used — hidden on all screen sizes */
.persona-carousel {
    display: none !important;
}

/* Mobile: CSS-only scroll-snap carousel */
.persona-carousel {
    overflow: hidden;
}

.persona-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0 1rem;
    scrollbar-width: none;
}

.persona-carousel-track::-webkit-scrollbar {
    display: none;
}

.persona-carousel-item {
    flex: 0 0 80vw;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Mobile CSS blob — animated with pure CSS, zero JavaScript */
.persona-blob-fallback {
    width: 140px;
    height: 140px;
    background: radial-gradient(ellipse at 30% 30%, var(--persona-color-light), var(--persona-color));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blob-morph 7s ease-in-out infinite alternate, blob-pulse 3s ease-in-out infinite;
    box-shadow: 0 0 40px var(--persona-color);
}

@keyframes blob-morph {
    0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50%  { border-radius: 50% 60% 30% 60% / 30% 70% 70% 30%; }
    75%  { border-radius: 40% 60% 60% 40% / 70% 30% 40% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes blob-pulse {
    0%, 100% { transform: scale(1.0); }
    50%       { transform: scale(1.06); }
}
}

/* -----------------------------------------------
   Persona Card — Conversation State UI
   Phase 2: Voice Integration
   ----------------------------------------------- */

/* Status text: "Connecting..." | "Live" | empty */
.persona-status {
    font-size: 0.8rem;
    color: #94a3b8;
    min-height: 1.2em;
    text-align: center;
    transition: color 0.3s ease;
}
.persona-status--live {
    color: var(--persona-color, #34d399);
    font-weight: 500;
}

/* Stop button: "End Call" — subtle danger pill, only visible during active session */
.persona-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.02em;
}
.persona-stop-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.6);
}
.persona-stop-btn[hidden] {
    display: none;
}

/* Error zone — inline under active blob card */
.persona-error {
    font-size: 0.8rem;
    color: #f87171;
    text-align: center;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.persona-error[hidden] {
    display: none;
}
.persona-retry-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.2s ease;
}
.persona-retry-btn:hover {
    background: rgba(148, 163, 184, 0.16);
}

/* Dim non-active cards when a session is active */
.persona-card--dim {
    opacity: 0.6;
    transition: opacity 0.4s ease;
}
.persona-card {
    transition: opacity 0.4s ease;
}

/* ============================================================
   Phase 3: Persona Identity
   ============================================================ */

/* Active card — halo blazes bright, no CSS scale (3D handles robot size) */
.persona-card--active::before {
    opacity: 1;
    filter: blur(8px);
    background: radial-gradient(
        ellipse at 50% 55%,
        rgba(var(--persona-color-rgb), 0.65) 0%,
        rgba(var(--persona-color-rgb), 0.30) 45%,
        transparent 72%
    );
    transition: opacity 0.35s ease, filter 0.35s ease;
}

/* Dim enhancement — fade out halo + robot on inactive cards */
.persona-card--dim .persona-blob-slot {
    filter: brightness(0.5) saturate(0.6);
    transition: filter 0.4s ease;
}
.persona-card--dim::before {
    opacity: 0.25;
    transition: opacity 0.4s ease;
}
.persona-card--dim .persona-name,
.persona-card--dim .persona-industry {
    opacity: 0.45;
    transition: opacity 0.4s ease;
}

/* Persona name colored dot */
.persona-name::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--persona-color, #a78bfa);
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.85;
}

/* Stop button persona-colored (overrides neutral red via higher specificity) */
.persona-card .persona-stop-btn {
    border-color: rgba(var(--persona-color-rgb), 0.4);
    background: rgba(var(--persona-color-rgb), 0.12);
    color: var(--persona-color);
}
.persona-card .persona-stop-btn:hover {
    background: rgba(var(--persona-color-rgb), 0.22);
    border-color: rgba(var(--persona-color-rgb), 0.6);
}

/* CTA slot — container and animation */
.persona-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0 0.25rem;
    animation: fadeInUp 0.4s ease forwards;
}
.persona-cta[hidden] {
    display: none;
}
.persona-cta-text {
    font-size: 0.82rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.45;
    max-width: 190px;
    margin: 0;
}
.persona-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 9999px;
    background: var(--persona-color, #a78bfa);
    color: #0a0a0a;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}
.persona-cta-btn:hover {
    opacity: 0.82;
    transform: translateY(-1px);
}

/* ============================================
   CHAT WIDGET
   ============================================ */

#chat-widget-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* FAB */
.chat-fab {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #c084fc);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}
.chat-fab:hover {
    transform: scale(1.07);
    box-shadow: 0 6px 28px rgba(34, 211, 238, 0.5);
}
.chat-fab--open {
    box-shadow: 0 4px 20px rgba(192, 132, 252, 0.4);
}
.chat-fab-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(34, 211, 238, 0.35);
    animation: chat-pulse 2.5s ease-in-out infinite;
}
@keyframes chat-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50%       { transform: scale(1.18); opacity: 0; }
}

/* Panel */
.chat-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 370px;
    height: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: rgba(13, 13, 13, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.chat-panel--open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
}
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee22, #c084fc22);
    border: 1px solid rgba(34, 211, 238, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22d3ee;
    flex-shrink: 0;
}
.chat-agent-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.01em;
}
.chat-status-line {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #475569;
    transition: background 0.3s ease;
}
.chat-status-dot[data-state="online"],
.chat-status-dot[data-state="speaking"] {
    background: #22d3ee;
    box-shadow: 0 0 5px #22d3ee;
}
.chat-status-dot[data-state="connecting"] {
    background: #f97316;
    animation: chat-pulse-dot 1s ease-in-out infinite;
}
@keyframes chat-pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
.chat-status-text {
    font-size: 0.72rem;
    color: #64748b;
}
.chat-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.chat-close-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #f1f5f9;
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
    min-height: 0;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Message bubbles */
.chat-msg {
    display: flex;
    max-width: 85%;
}
.chat-msg--user {
    align-self: flex-end;
    justify-content: flex-end;
}
.chat-msg--agent {
    align-self: flex-start;
}
.chat-msg--system {
    align-self: center;
}
.chat-bubble-text {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.84rem;
    line-height: 1.45;
    word-break: break-word;
}
.chat-msg--user .chat-bubble-text {
    background: rgba(34, 211, 238, 0.15);
    color: #e2e8f0;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-bottom-right-radius: 3px;
}
.chat-msg--agent .chat-bubble-text {
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom-left-radius: 3px;
}
.chat-msg--agent .chat-bubble-text:empty {
    display: none;
}
.chat-msg--system .chat-bubble-text {
    background: transparent;
    color: #475569;
    font-size: 0.75rem;
    font-style: italic;
    padding: 2px 6px;
    border: none;
}

/* Footer */
.chat-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* Connecting indicator */
.chat-connecting-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
}
.chat-connecting-text {
    font-size: 0.78rem;
    color: #64748b;
    animation: chat-pulse-dot 1.2s ease-in-out infinite;
}

/* Input bar */
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
}
.chat-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 0.84rem;
    color: #e2e8f0;
    resize: none;
    overflow: hidden;
    line-height: 1.45;
    font-family: inherit;
    transition: border-color 0.15s ease;
    min-height: 38px;
    max-height: 120px;
}
.chat-input::placeholder { color: #64748b; }
.chat-input:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.4);
}
.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #22d3ee, #c084fc);
    color: #0a0a0a;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.07);
}
.chat-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

/* Teaser bubble */
.chat-teaser {
    position: absolute;
    bottom: 68px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px 12px 4px 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    white-space: nowrap;
    cursor: pointer;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.chat-teaser--visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}
.chat-teaser-text {
    font-size: 0.82rem;
    color: #e2e8f0;
    font-weight: 500;
}
.chat-teaser-close {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.chat-teaser-close:hover {
    background: rgba(255,255,255,0.15);
    color: #f1f5f9;
}

/* Mobile */
@media (max-width: 480px) {
    #chat-widget-root {
        bottom: 16px;
        right: 16px;
    }
    .chat-panel {
        width: calc(100vw - 32px);
        right: 0;
        height: 70vh;
        max-height: 70vh;
    }
    .chat-teaser {
        right: 0;
        bottom: 68px;
    }
}
