/* ==========================================================================
   CSS Variables & Theming System (Extreme Premium Aesthetic)
   ========================================================================== */
:root {
    /* Extreme Dark Mode (Vercel/Linear style) */
    --background: #000000;
    --background-surface: #0a0a0a;
    --background-surface-hover: #111111;
    --foreground: #ffffff;
    --foreground-muted: #888888;
    
    /* Accents */
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    /* Glassmorphism */
    --glass-bg: rgba(0, 0, 0, 0.5);
    
    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --tracking-tight: -0.02em;
    --tracking-tighter: -0.04em;
    --leading-none: 1;
    --leading-tight: 1.2;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ffffff 0%, #a3a3a3 100%);
}

[data-theme="light"] {
    --background: #ffffff;
    --background-surface: #fafafa;
    --background-surface-hover: #f4f4f5;
    --foreground: #000000;
    --foreground-muted: #666666;
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --accent-glow: rgba(0, 0, 0, 0.05);
    --gradient-primary: linear-gradient(135deg, #000000 0%, #555555 100%);
}

[dir="rtl"] {
    text-align: right;
    --font-display: 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
[dir="rtl"] h1, 
[dir="rtl"] h2, 
[dir="rtl"] p {
    font-weight: 400 !important;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-display);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }

.hidden { display: none !important; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-muted { color: var(--foreground-muted); }
.text-sm { font-size: 0.875rem; }

/* Gradients text */
.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-primary {
    background-image: var(--gradient-primary);
}

/* ==========================================================================
   Background Glows (Ambient Lighting)
   ========================================================================== */
.glow-bg {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
}
.top-glow { top: -200px; left: 50%; transform: translateX(-50%); }
.bottom-glow { bottom: -200px; right: -200px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.2s ease;
}
.btn-primary {
    background: var(--foreground);
    color: var(--background);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}
.btn svg { width: 16px; height: 16px; }

/* ==========================================================================
   Layout & Sections
   ========================================================================== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem;
}
.section-header { margin-bottom: 4rem; }
.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: var(--tracking-tighter);
    margin-bottom: 1rem;
    font-weight: 700;
}
.section-subtext {
    font-size: 1.25rem;
    color: var(--foreground-muted);
    max-width: 600px;
}

/* ==========================================================================
   Section: Sticky Header
   ========================================================================== */
.sticky-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 700; font-size: 1rem;
    letter-spacing: -0.02em;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-light { display: none !important; }
.logo-dark { display: block !important; }

[data-theme="light"] .logo-dark { display: none !important; }
[data-theme="light"] .logo-light { display: block !important; }

.nav-links { display: flex; gap: 2rem; }
.nav-item {
    font-size: 0.875rem;
    color: var(--foreground-muted);
    transition: color 0.2s;
}
.nav-item:hover { color: var(--foreground); }

.header-controls { display: flex; align-items: center; gap: 1rem; }
.icon-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--background-surface); border-color: var(--border-hover); }
.icon-btn svg { width: 16px; height: 16px; }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.lang-btn {
    font-size: 0.75rem; font-weight: 600;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--border-hover); background: var(--background-surface); }
.mobile-menu-btn { display: none; }

/* Mobile Menu Base */
.mobile-menu-overlay {
    position: fixed; inset: 0; width: 100%; height: 100vh;
    background: var(--background); z-index: 1000;
    display: flex; flex-direction: column; padding: 2rem;
    transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    visibility: hidden; pointer-events: none;
}
.mobile-menu-overlay.active {
    transform: translateY(0); visibility: visible; pointer-events: auto;
}
.mobile-menu-header { display: flex; justify-content: flex-end; margin-bottom: 4rem; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 2rem; align-items: center; justify-content: center; flex: 1; }
.mobile-nav-item { font-size: 2.5rem; font-weight: 700; transition: color 0.2s; letter-spacing: -0.02em; }
.mobile-nav-item:hover { color: var(--foreground-muted); }
.mobile-menu-bottom { padding: 2rem 0; display: flex; justify-content: center; border-top: 1px solid var(--border); }
.mobile-menu-bottom .theme-toggle-btn { 
    width: 100%; border-radius: 999px; padding: 1rem; 
    display: flex; justify-content: center; gap: 0.5rem; 
    font-weight: 600; background: var(--background-surface);
}
@media (min-width: 769px) {
    .mobile-menu-overlay { display: none !important; }
}

/* ==========================================================================
   Section: Hero Split Editorial
   ========================================================================== */
.hero-split-section {
    position: relative;
    min-height: 100vh;
    padding-top: 150px;
    padding-bottom: 6rem;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 100% 0%, #17171e 0%, var(--background) 50%);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
[data-theme="light"] .hero-split-section {
    background: radial-gradient(circle at 100% 0%, #e2e8f0 0%, var(--background) 50%);
}
[dir="rtl"] .hero-split-section {
    background: radial-gradient(circle at 0% 0%, #17171e 0%, var(--background) 50%);
}
[data-theme="light"][dir="rtl"] .hero-split-section {
    background: radial-gradient(circle at 0% 0%, #e2e8f0 0%, var(--background) 50%);
}

.hero-noise-overlay {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    opacity: 0.04; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.hero-split-container {
    position: relative; z-index: 10;
    max-width: 1400px; margin: 0 auto; width: 100%;
    padding: 0 6vw;
    display: grid; grid-template-columns: 1fr 1.1fr; gap: 5vw;
    align-items: center;
}

/* Text Side */
.hero-text-side {
    display: flex; flex-direction: column; align-items: flex-start;
}
[dir="rtl"] .hero-text-side { align-items: flex-start; }

.hero-editorial-title {
    font-size: clamp(3rem, 5vw, 5.5rem); font-weight: 800;
    line-height: 1.1; letter-spacing: var(--tracking-tighter);
    margin-bottom: 2rem; color: var(--foreground);
}
[dir="rtl"] .hero-editorial-title { line-height: 1.2; text-align: right; }
.title-line { display: block; }
.text-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
[data-theme="light"] .text-accent {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-editorial-sub {
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    color: var(--foreground-muted); line-height: 1.6;
    margin-bottom: 3.5rem; max-width: 90%; font-weight: 400;
}
[dir="rtl"] .hero-editorial-sub { text-align: right; }

.btn-editorial {
    display: inline-flex; align-items: center; gap: 1.5rem;
    background: var(--foreground); color: var(--background);
    padding: 1rem 2rem; border-radius: 12px;
    font-weight: 600; font-size: 1.125rem;
    transition: transform 0.3s, box-shadow 0.3s;
}
.btn-editorial:hover {
    transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
[data-theme="light"] .btn-editorial:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.15); }

.btn-editorial-arrow {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--background); color: var(--foreground);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
}
.btn-editorial:hover .btn-editorial-arrow { transform: translateX(4px); }
[dir="rtl"] .btn-editorial:hover .btn-editorial-arrow { transform: translateX(-4px); }

/* Visual Side - Terminal */
.hero-visual-side {
    position: relative; width: 100%; perspective: 1000px;
}
.terminal-window {
    width: 100%; background: rgba(10,10,10,0.8);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}
[dir="rtl"] .terminal-window { transform: rotateY(10deg) rotateX(5deg); }
.hero-visual-side:hover .terminal-window { transform: rotateY(0deg) rotateX(0deg); }

[data-theme="light"] .terminal-window {
    background: rgba(255,255,255,0.8); border-color: rgba(0,0,0,0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.terminal-header {
    background: rgba(0,0,0,0.3); padding: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05); position: relative;
}
[data-theme="light"] .terminal-header { background: rgba(0,0,0,0.05); border-bottom-color: rgba(0,0,0,0.05); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-title {
    position: absolute; left: 50%; transform: translateX(-50%);
    font-family: monospace; font-size: 0.85rem; color: #888;
}

.terminal-body {
    padding: 2rem; font-family: monospace; font-size: 0.95rem; line-height: 1.8;
}
.term-line {
    overflow: hidden; white-space: nowrap; border-right: 2px solid transparent; /* fake cursor */
    animation: copyType 1.5s steps(40, end) forwards; width: 0; margin-bottom: 0.5rem; text-align: left; direction: ltr;
}
.term-line.sys { border-right: none; opacity: 0; animation: sysFade 0.1s forwards; width: auto; text-wrap: wrap; }

@keyframes copyType { from { width: 0; } to { width: 100%; border-color: transparent; } }
@keyframes sysFade { to { opacity: 1; } }

.term-prompt { color: #8b5cf6; font-weight: bold; margin-right: 0.5rem; }
.term-cmd { color: #e2e8f0; }
[data-theme="light"] .term-cmd { color: #1e293b; }
.term-info { color: #64748b; }
.term-success { color: #10b981; }

.delay-0 { animation-delay: 0.5s; }
.delay-1 { animation-delay: 2.2s; }
.delay-2 { animation-delay: 3s; }
.delay-3 { animation-delay: 5s; }
.delay-4 { animation-delay: 6s; }

/* Floating stat */
.floating-stat-card {
    position: absolute; bottom: -1.5rem; right: -1rem;
    background: var(--background-surface); border: 1px solid var(--border);
    padding: 1.5rem; border-radius: 16px; display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: floatAnim 6s ease-in-out infinite; z-index: 20;
    white-space: nowrap; min-width: max-content;
}
[dir="rtl"] .floating-stat-card { right: auto; left: -1rem; }
@keyframes floatAnim { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.stat-icon {
    width: 48px; height: 48px; border-radius: 12px; background: rgba(34,197,94,0.1); color: #22c55e;
    display: flex; align-items: center; justify-content: center;
}
.stat-info { display: flex; flex-direction: column; }
.stat-val { font-size: 1.5rem; font-weight: 800; color: var(--foreground); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--foreground-muted); margin-top: 0.25rem; }

@media (max-width: 1024px) {
    .hero-split-container { grid-template-columns: 1fr; padding-top: 10vh; gap: 4rem; }
    .hero-text-side { align-items: center; text-align: center; }
    [dir="rtl"] .hero-text-side { align-items: center; text-align: center; }
    .hero-editorial-title { font-size: 3.5rem; }
    [dir="rtl"] .hero-editorial-title { text-align: center; }
    .hero-editorial-sub { text-align: center; margin: 0 auto 3rem; }
    [dir="rtl"] .hero-editorial-sub { text-align: center; }
    .terminal-window { transform: none; margin-bottom: 2rem; }
    .floating-stat-card { bottom: -1rem; right: 1rem; }
    [dir="rtl"] .floating-stat-card { right: auto; left: 1rem; }
}
@media (max-width: 768px) {
    .hero-editorial-title { font-size: 2.5rem; }
    .terminal-body { font-size: 0.8rem; padding: 1.5rem; }
    .floating-stat-card { display: none; }
}

/* ==========================================================================
   Section: Infinite Marquee
   ========================================================================== */
.tech-stack {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--background-surface);
}
.tech-marquee {
    direction: ltr;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.tech-track {
    display: flex; width: max-content;
    animation: marqueeTech 35s linear infinite;
}
.tech-group {
    display: flex; align-items: center; gap: 5rem; padding-right: 5rem;
}
.tech-brand {
    display: flex; align-items: center; justify-content: center;
    opacity: 0.45;
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
    filter: grayscale(100%);
}
.tech-brand:hover {
    opacity: 1; filter: grayscale(0%); transform: scale(1.05);
}
.tech-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}
@media (max-width: 768px) {
    .tech-img { height: 36px; }
}
@keyframes marqueeTech {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Linear-style Mouse Tracking Hover Glow (Core Utility)
   ========================================================================== */
.hover-glow {
    position: relative;
    background: var(--background-surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    z-index: 1;
}

.hover-glow::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(
        800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
        rgba(255, 255, 255, 0.05),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
    pointer-events: none;
}
.hover-glow:hover::before { opacity: 1; }

[data-theme="light"] .hover-glow::before {
    background: radial-gradient(
        800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
        rgba(0, 0, 0, 0.03),
        transparent 40%
    );
}

/* ==========================================================================
   Section: Services (What We Do - Bento Grid)
   ========================================================================== */
.bento-section {
    background: var(--background);
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.bento-card {
    padding: 2.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    transition: transform 0.2s, background-color 0.2s;
}
[dir="rtl"] .bento-card { text-align: right; }

.bento-span-2 { grid-column: span 2; }

.bento-icon {
    width: 48px; height: 48px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    color: var(--foreground);
}
.bento-icon svg { width: 24px; height: 24px; }
.bento-card h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.bento-card p { color: var(--foreground-muted); font-size: 0.95rem; }

/* ==========================================================================
   Section: Use Cases (Columns)
   ========================================================================== */
.uc-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.uc-card {
    padding: 3rem 2rem;
    display: flex; flex-direction: column; gap: 2rem;
}
[dir="rtl"] .uc-card { text-align: right; }

.uc-badge {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 9999px;
}
[dir="rtl"] .uc-badge { align-self: flex-end; }

.uc-list { display: flex; flex-direction: column; gap: 1.25rem; }
.uc-list li {
    display: flex; align-items: center; gap: 1rem;
    color: var(--foreground);
    font-weight: 500;
}
.uc-list svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--foreground); }

/* ==========================================================================
   Section: ROI Calculator
   ========================================================================== */
.roi-section {
    padding: 8rem 0;
    position: relative;
    background: var(--background);
}

.roi-card {
    position: relative;
    padding: 5rem;
    border-radius: 32px;
    background: var(--background-surface);
    border: 1px solid var(--border);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 20px 40px rgba(255, 255, 255, 0.02),
        0 40px 80px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .roi-card {
    box-shadow: 
        inset 0 0 0 1px rgba(0, 0, 0, 0.05),
        inset 0 20px 40px rgba(0, 0, 0, 0.02),
        0 40px 80px rgba(0, 0, 0, 0.1);
}

.roi-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.04), transparent 50%);
    pointer-events: none;
    z-index: 0;
}
[data-theme="light"] .roi-card::after {
    background: radial-gradient(circle at 70% 50%, rgba(0, 0, 0, 0.03), transparent 50%);
}

.roi-card > * {
    position: relative;
    z-index: 1;
}

.roi-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

[dir="rtl"] .roi-content {
    text-align: right;
}

@media (max-width: 992px) {
    .roi-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.roi-left {
    display: flex;
    flex-direction: column;
}

.roi-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: var(--tracking-tighter);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.roi-desc {
    font-size: 1.125rem;
    color: var(--foreground-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.roi-input-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.roi-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.roi-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--foreground-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.roi-val-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1;
}

/* Custom Slider Styling */
.roi-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    outline: none;
    transition: background 0.2s;
}
[data-theme="light"] .roi-slider {
    background: rgba(0, 0, 0, 0.1);
}

.roi-slider:hover {
    background: rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .roi-slider:hover {
    background: rgba(0, 0, 0, 0.15);
}

.roi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--foreground);
    cursor: grab;
    border: 4px solid var(--background-surface);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.roi-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

/* Custom Number Input Styling */
.roi-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
[data-theme="light"] .roi-input-wrapper {
    background: rgba(0, 0, 0, 0.02);
}

.roi-input-wrapper:focus-within {
    border-color: var(--foreground);
    box-shadow: 0 0 0 1px var(--foreground);
}

.currency-symbol {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground-muted);
    margin-right: 0.5rem;
}
[dir="rtl"] .currency-symbol {
    margin-right: 0;
    margin-left: 0.5rem;
}

.roi-number-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--foreground);
    font-size: 2rem;
    font-weight: 700;
    outline: none;
    padding: 0;
}
.roi-number-input::-webkit-inner-spin-button,
.roi-number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Right Side: Output Box */
.roi-right {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.roi-result-box {
    width: 100%;
    padding: 4rem;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.02);
    transition: transform 0.3s ease;
}

[data-theme="light"] .roi-result-box {
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.02), transparent);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.02);
}

.roi-result-box:hover {
    transform: translateY(-5px);
}

.roi-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground-muted);
}

.roi-amount-wrapper {
    position: relative;
    display: inline-block;
}

.roi-amount {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: var(--tracking-tighter);
    line-height: 1;
    text-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .roi-amount {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .roi-card {
        padding: 3rem 2rem;
    }
    .roi-content {
        gap: 2.5rem;
    }
    .roi-result-box {
        padding: 3rem 1.5rem;
    }
}

/* ==========================================================================
   Section: Contact Form (Split Card Design)
   ========================================================================== */
.split-contact-card {
    display: flex;
    border-radius: 24px;
    background: var(--background-surface);
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    max-width: 1050px;
    margin: 0 auto;
}

.scc-info {
    width: 40%;
    padding: 5rem 4rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
}
[dir="rtl"] .scc-info { border-right: none; border-left: 1px solid var(--border); }

.scc-methods {
    display: flex; flex-direction: column; gap: 3rem; margin-top: 2rem;
}
.scc-method-item {
    display: flex; align-items: flex-start; gap: 1.5rem;
}
.scc-icon {
    width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.02);
    flex-shrink: 0;
}
[data-theme="light"] .scc-icon { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.02); }
.scc-icon svg { width: 20px; height: 20px; color: var(--foreground); }
.scc-text { font-size: 0.95rem; color: var(--foreground-muted); line-height: 1.5; padding-top: 2px; }

.scc-form {
    width: 60%; padding: 5rem; position: relative;
}
.scc-form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
}

.scc-input-group {
    display: flex; flex-direction: column; margin-bottom: 3.5rem;
}
.scc-input-group label {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--foreground); margin-bottom: 0.5rem;
}
.scc-input-group input, .scc-input-group textarea {
    width: 100%; border: none; border-bottom: 1px solid var(--border);
    background: transparent; color: var(--foreground);
    padding: 0.5rem 0; outline: none; font-size: 1rem;
    transition: border-color 0.3s; font-family: inherit;
    border-radius: 0; -webkit-appearance: none; appearance: none;
}
.scc-input-group input:focus, .scc-input-group textarea:focus { border-color: var(--primary); }
.scc-input-group textarea { resize: vertical; min-height: 80px; }

.scc-input-group input::placeholder, .scc-input-group textarea::placeholder {
    color: var(--border-hover); font-weight: 400;
}
[data-theme="light"] .scc-input-group input::placeholder, [data-theme="light"] .scc-input-group textarea::placeholder { color: rgba(0,0,0,0.3); }

.scc-form .submit-btn {
    background: var(--foreground); color: var(--background);
    border: none; border-radius: 8px; font-weight: 600; padding: 1.25rem 2.5rem;
    font-size: 1rem; cursor: pointer; transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); align-self: flex-start;
    margin-top: 1rem;
}
.scc-form .submit-btn:hover { transform: translateY(-2px); opacity: 0.9; }

.form-success {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--background-surface);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 20; padding: 2rem;
}
.success-icon {
    width: 64px; height: 64px; border-radius: 50%; background: rgba(34, 197, 94, 0.1);
    color: #22c55e; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.success-icon svg { width: 32px; height: 32px; }

/* ==========================================================================
   Section: Interactive Hover Matrix (Services)
   ========================================================================== */
.services-matrix-section {
    position: relative;
    padding: 8rem 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: var(--background);
}

.services-matrix-bg {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.matrix-bg-item {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease;
    transform: scale(1.05);
}
.matrix-bg-item.active {
    opacity: 1; visibility: visible; transform: scale(1);
}
[data-theme="light"] .matrix-bg-item {
    mix-blend-mode: multiply;
}

.matrix-header {
    margin-bottom: 4rem;
}

.matrix-list {
    display: flex; flex-direction: column; width: 100%; border-top: 1px solid var(--border);
}

.matrix-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
    position: relative; cursor: pointer;
    transition: padding 0.4s ease;
}

/* Hover effects */
@media (min-width: 1025px) {
    .matrix-item:hover {
        padding-left: 2rem; padding-right: 2rem;
        background: rgba(255,255,255,0.02);
    }
    [data-theme="light"] .matrix-item:hover { background: rgba(0,0,0,0.02); }
}

.matrix-item-header {
    display: flex; align-items: baseline; gap: 2rem; flex: 1;
}

.matrix-num {
    font-size: 1.25rem; font-weight: 600; color: var(--foreground-muted);
    font-family: monospace; transition: color 0.3s;
}

.matrix-item h3 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 800; letter-spacing: var(--tracking-tighter);
    color: var(--foreground-muted);
    transition: color 0.4s ease, transform 0.4s ease;
    margin: 0; line-height: 1;
}

/* When active/hovered */
@keyframes activeServiceBox {
    0%, 100% { background: rgba(255,255,255,0.02); }
    50% { background: rgba(255,255,255,0.06); }
}
@keyframes activeServiceBoxLight {
    0%, 100% { background: rgba(0,0,0,0.02); }
    50% { background: rgba(0,0,0,0.06); }
}

@media (min-width: 1025px) {
    .matrix-item.active {
        padding-left: 2rem; padding-right: 2rem;
        border-radius: 12px;
        animation: activeServiceBox 3s ease-in-out infinite;
    }
    [data-theme="light"] .matrix-item.active {
        animation: activeServiceBoxLight 3s ease-in-out infinite;
    }
}

.matrix-item.active h3, .matrix-item:hover h3 {
    color: var(--foreground);
    transform: translateX(10px);
}
[dir="rtl"] .matrix-item.active h3, [dir="rtl"] .matrix-item:hover h3 {
    transform: translateX(-10px);
}

@keyframes numBlink {
    0%, 100% { color: var(--foreground); text-shadow: none; opacity: 1; }
    50% { color: #10b981; text-shadow: 0 0 10px rgba(16,185,129,0.5); opacity: 0.6; }
}
.matrix-item.active .matrix-num {
    animation: numBlink 2.5s ease-in-out infinite;
}
.matrix-item:hover .matrix-num {
    color: var(--foreground);
}

.matrix-item-content {
    flex: 0 0 320px;
    opacity: 0; transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-align: right;
}
[dir="rtl"] .matrix-item-content {
    text-align: left; transform: translateX(-20px);
}
.matrix-item.active .matrix-item-content, .matrix-item:hover .matrix-item-content {
    opacity: 1; transform: translateX(0) !important;
}

.matrix-item p {
    font-size: 1.125rem; color: var(--foreground-muted); line-height: 1.5; margin: 0; font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .matrix-item {
        flex-direction: column; align-items: flex-start; padding: 2rem 0 !important; gap: 1rem;
    }
    .matrix-item.active h3, .matrix-item:hover h3 { transform: none; }
    .matrix-item-header { gap: 1rem; flex-wrap: wrap; }
    .matrix-item-content {
        flex: none; opacity: 1; transform: none; text-align: left; padding-left: 2.5rem;
    }
    [dir="rtl"] .matrix-item-content {
        text-align: right; padding-left: 0; padding-right: 2.5rem; transform: none;
    }
}
@media (max-width: 768px) {
    .services-matrix-section { padding: 4rem 0; min-height: auto; }
    .matrix-header { margin-bottom: 2rem; }
    .matrix-item h3 { font-size: 2rem; }
    .matrix-num { font-size: 1rem; margin-top: 0.5rem; }
    .matrix-item-content { padding-left: 0; }
    [dir="rtl"] .matrix-item-content { padding-right: 0; }
}

/* ==========================================================================
   Language Switch Loader
   ========================================================================== */
.lang-loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--background);
    z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lang-loader-overlay.active {
    opacity: 1; pointer-events: auto; visibility: visible;
}
.lang-loader-content {
    display: flex; flex-direction: column; align-items: center; gap: 2rem;
}
.loader-logo {
    height: 80px; width: auto; object-fit: contain;
}
.pulse-anim {
    animation: loaderPulse 1.5s ease-in-out infinite;
}
@keyframes loaderPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(255,255,255,0.2)); }
}
@keyframes loaderPulseLight {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(0,0,0,0.2)); }
}
[data-theme="light"] .pulse-anim {
    animation: loaderPulseLight 1.5s ease-in-out infinite;
}
.loader-text-container {
    height: 24px; overflow: hidden;
    font-family: monospace; font-size: 0.9rem; color: var(--foreground-muted);
}
.typing-engine {
    display: inline-block; white-space: nowrap; overflow: hidden;
    border-right: 2px solid var(--foreground);
    animation: typingEngine 1.2s steps(40, end), blinkCursor 0.5s step-end infinite;
}
@keyframes typingEngine {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--foreground); }
}

/* ==========================================================================
   Section: Integrations Anim Marquee
   ========================================================================== */
.integrations-section {
    padding: 10rem 0;
    position: relative;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(99,102,241,0.05) 0%, transparent 60%);
}
[data-theme="light"] .integrations-section {
    background: radial-gradient(circle at center, rgba(99,102,241,0.02) 0%, transparent 60%);
}

.int-kicker {
    display: block; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.5rem; color: #f97316;
}
.int-title { margin-bottom: 1.5rem; font-size: clamp(2.5rem, 4vw, 3.5rem); }
.int-sub { font-size: 1.125rem; max-width: 800px; color: var(--foreground-muted); line-height: 1.6; }

.int-marquee-container {
    position: relative; width: 100%; max-width: 1400px; margin: 4rem auto 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.int-marquee-track {
    display: flex; gap: 1.5rem; width: fit-content; margin: 0 auto;
}

.int-marquee-content {
    display: flex; gap: 1.5rem; flex-shrink: 0; min-width: min-content;
}

.content-left { animation: marqueeLeft 40s linear infinite; }
.content-right { animation: marqueeRight 40s linear infinite; }

.int-marquee-track:hover .int-marquee-content { animation-play-state: paused; }

@keyframes marqueeLeft {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 1.5rem)); }
}
@keyframes marqueeRight {
    from { transform: translateX(calc(-100% - 1.5rem)); }
    to { transform: translateX(0); }
}

.int-icon-card {
    width: 84px; height: 84px; flex-shrink: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}
[data-theme="light"] .int-icon-card {
    background: #ffffff; border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.int-icon-card:hover { transform: translateY(-5px) scale(1.05); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); z-index: 10; cursor: pointer; }
[data-theme="light"] .int-icon-card:hover { border-color: rgba(0,0,0,0.15); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

.int-icon-card img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); opacity: 0.9; transition: opacity 0.3s, filter 0.3s; }
.int-icon-card:hover img { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)); opacity: 1; }
[data-theme="light"] .int-icon-card img { filter: none; opacity: 1; }

.active-card {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2), inset 0 0 20px rgba(99, 102, 241, 0.05);
}
.active-card img {
    opacity: 1; filter: drop-shadow(0 2px 6px rgba(99, 102, 241, 0.5));
}
[data-theme="light"] .active-card {
    background: rgba(99, 102, 241, 0.05); border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.int-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1.25rem 2.5rem; border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff !important; font-weight: 700; font-size: 1rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s, box-shadow 0.3s; text-decoration: none;
}
.int-btn:hover {
    transform: translateY(-2px); box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

/* ==========================================================================
   Section: End-to-End Autonomy (Animated Overlap)
   ========================================================================== */
.overlap-section { padding: var(--section-padding) 0; }
.overlap-container-main { position: relative; }
.overlap-stack {
    margin-top: 4rem;
    padding-bottom: 10vh; /* Space to scroll past the final sticky card */
}

.overlap-card-wrap {
    position: sticky;
    top: 120px; /* Offset from header */
    height: 70vh; /* Natural scroll height */
    min-height: 500px; max-height: 700px;
    display: flex; align-items: center; justify-content: center;
    transform-origin: top center;
    margin-bottom: 4rem;
    z-index: 10;
}

/* Stacking z-indexes */
.overlap-card-wrap:nth-child(1) { z-index: 10; }
.overlap-card-wrap:nth-child(2) { z-index: 20; }
.overlap-card-wrap:nth-child(3) { z-index: 30; }
.overlap-card-wrap:nth-child(4) { z-index: 40; }

.overlap-card {
    width: 100%; height: 100%;
    border-radius: 32px; border: 1px solid rgba(255,255,255,0.1);
    padding: 4rem; overflow: hidden;
    position: relative;
    display: flex; flex-direction: column;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.5), 0 30px 60px rgba(0,0,0,0.8);
    transition: transform 0.1s;
    background-color: var(--background-surface);
}

/* Gradient backgrounds mimicking the screenshots */
.overlap-bg-1 { background: radial-gradient(120% 120% at 80% 0%, #1c1528 0%, #0a0a0a 100%); }
.overlap-bg-2 { background: radial-gradient(120% 120% at 80% 0%, #2e1818 0%, #0a0a0a 100%); }
.overlap-bg-3 { background: radial-gradient(120% 120% at 80% 0%, #291b12 0%, #0a0a0a 100%); }
.overlap-bg-4 { background: radial-gradient(120% 120% at 80% 0%, #151d2e 0%, #0a0a0a 100%); }

.overlap-pill {
    position: absolute; top: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.25rem 1rem; border-radius: 9999px;
    font-weight: 600; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase;
    color: #fff;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}
.pill-purple { background: #6366f1; border: 1px solid #818cf8; }
.pill-red { background: #ef4444; border: 1px solid #f87171; }
.pill-orange { background: #f97316; border: 1px solid #fb923c; }
.pill-blue { background: #3b82f6; border: 1px solid #60a5fa; }

.overlap-pill svg { width: 14px; height: 14px; }

.overlap-content {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem;
    height: 100%; margin-top: 1rem; align-items: stretch;
}

.overlap-text { display: flex; flex-direction: column; justify-content: center; }
.overlap-text h3 {
    font-size: 2.5rem; font-weight: 700; margin-bottom: 2.5rem;
    letter-spacing: var(--tracking-tighter);
}
.overlap-list { display: flex; flex-direction: column; gap: 1.5rem; }
.overlap-list li {
    display: flex; align-items: flex-start; gap: 1rem;
    color: var(--foreground); font-size: 1rem; font-weight: 500; line-height: 1.5;
}
.overlap-list li svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--foreground); }

.overlap-media {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px; overflow: hidden;
    background: #000; border: 1px solid var(--border);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
    padding: 2px;
}
.overlap-media img, .overlap-media video {
    width: 100%; height: 100%; object-fit: cover; object-position: left top; border-radius: 14px;
}

[data-theme="light"] .overlap-card { border-color: rgba(0,0,0,0.1); box-shadow: 0 -10px 30px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.1); }
[data-theme="light"] .overlap-bg-1 { background: linear-gradient(135deg, #eef2ff 0%, #fafafa 100%); }
[data-theme="light"] .overlap-bg-2 { background: linear-gradient(135deg, #fef2f2 0%, #fafafa 100%); }
[data-theme="light"] .overlap-bg-3 { background: linear-gradient(135deg, #fff7ed 0%, #fafafa 100%); }
[data-theme="light"] .overlap-bg-4 { background: linear-gradient(135deg, #eff6ff 0%, #fafafa 100%); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { 
    border-top: 1px solid var(--border); 
    background: var(--background); 
}

.footer-container {
    padding: 6rem 2rem 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand { max-width: 300px; }
.footer-brand .mt-4 { margin-top: 1rem; }

[dir="rtl"] .footer-brand { text-align: right; }

.footer-links-grid {
    display: flex; gap: 6rem;
}

.footer-link-col {
    display: flex; flex-direction: column; gap: 1rem;
}

[dir="rtl"] .footer-link-col { text-align: right; }

.footer-link-col h4 {
    font-size: 1rem; font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.footer-link-col a {
    color: var(--foreground-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-link-col a:hover { color: var(--foreground); }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 2rem; border-top: 1px solid var(--border);
}

.footer-socials { display: flex; gap: 1.5rem; }

.footer-socials a {
    color: var(--foreground-muted);
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
}

.footer-socials a:hover {
    color: var(--foreground);
    transform: scale(1.1);
}

.footer-socials svg { width: 20px; height: 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .bento-grid, .uc-columns { grid-template-columns: repeat(2, 1fr); }
    .bento-span-2 { grid-column: span 1; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .desktop-theme-btn { display: none !important; }
    .mobile-menu-btn { display: flex; }
    .bento-grid, .uc-columns { grid-template-columns: 1fr; }
    .roi-controls { grid-template-columns: 1fr; gap: 2rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 4rem; }
    .split-contact-card { flex-direction: column; }
    .scc-info { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 3rem 2rem; }
    [dir="rtl"] .scc-info { border-left: none; }
    .scc-form { width: 100%; padding: 3rem 2rem; }
    .scc-form-row { grid-template-columns: 1fr; gap: 0; }
    .section-container { padding: 4rem 1.5rem; }
    .hero-content { padding-top: 4rem; }
    .roi-card, .contact-form { padding: 2rem; }
    
    .footer-top { flex-direction: column; gap: 3rem; }
    .footer-links-grid { flex-wrap: wrap; gap: 3rem; justify-content: space-between; }
    .footer-link-col { min-width: 40%; }
    .footer-bottom { flex-direction: column-reverse; gap: 1.5rem; text-align: center; }

    /* Overlap (Autonomy) Mobile */
    .overlap-card-wrap {
        height: 80vh; min-height: 0; max-height: none;
        top: 90px; margin-bottom: 1rem;
    }
    .overlap-card { padding: 1.5rem; border-radius: 24px; justify-content: flex-start; }
    .overlap-pill { 
        position: relative; top: 0; left: 0; transform: none; 
        display: inline-flex; align-self: flex-start; margin-bottom: 1rem; 
    }
    .overlap-content { 
        display: flex; flex-direction: column; gap: 1rem; margin-top: 0; 
        height: auto;
    }
    .overlap-text h3 { font-size: 1.75rem; margin-bottom: 0.5rem; line-height: 1.2; }
    .overlap-list { gap: 0.5rem; }
    .overlap-list li { font-size: 0.9rem; line-height: 1.3; }
    .overlap-media { 
        min-height: 200px; height: 30vh; margin-top: 1rem; flex-shrink: 0;
        border-radius: 12px;
    }
}

/* ==========================================================================
   Floating AI Chatbot (Grodd Ai)
   ========================================================================== */
.grodd-chatbot {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
    display: flex; flex-direction: column; align-items: flex-end; gap: 1rem;
    pointer-events: none; /* Allows clicking through the invisible container bounds */
}
[dir="rtl"] .grodd-chatbot { right: auto; left: 2rem; align-items: flex-start; }

/* Chat Toggle Button */
.chat-toggle-btn {
    pointer-events: auto; /* Re-enable clicks strictly on the button */
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%); 
    color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4), inset 0 2px 2px rgba(255,255,255,0.2);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    border: none; cursor: pointer;
}
.chat-toggle-btn:hover { 
    transform: scale(1.1) translateY(-2px); 
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.5), inset 0 2px 2px rgba(255,255,255,0.2); 
}
.chat-toggle-icon svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }

/* Chat Window */
.chat-window {
    width: 400px; height: 600px; max-height: calc(100vh - 120px);
    background: rgba(10, 10, 10, 0.75); 
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 24px;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    opacity: 0; transform: translateY(20px) scale(0.95); pointer-events: none;
    transform-origin: bottom right; transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
[dir="rtl"] .chat-window { transform-origin: bottom left; }
[data-theme="light"] .chat-window { 
    background: rgba(255,255,255,0.85); 
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,1); 
}

.chat-window.open {
    opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}

/* Header */
.chat-header {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
}
[data-theme="light"] .chat-header { 
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, transparent 100%); 
}
.chat-header-info { display: flex; align-items: center; gap: 1rem; }
.chat-avatar { 
    width: 42px; height: 42px; border-radius: 12px; 
    background: var(--background); 
    display: flex; align-items: center; justify-content: center; 
    border: 1px solid rgba(255,255,255,0.1); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
[data-theme="light"] .chat-avatar { border: 1px solid rgba(0,0,0,0.05); }
.chat-avatar img { height: 24px; width: auto; object-fit: contain; }
.chat-title { font-size: 1.15rem; font-weight: 800; color: var(--foreground); margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.chat-status { font-size: 0.8rem; color: #10b981; display: flex; align-items: center; gap: 0.4rem; margin-top: 0.25rem; font-weight: 500; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 12px #10b981; }

.close-chat { 
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.05); 
    transition: background 0.2s, transform 0.2s; border: none; cursor: pointer;
    color: var(--foreground); display: flex; align-items: center; justify-content: center;
}
.close-chat:hover { background: rgba(255,255,255,0.15); transform: rotate(90deg); }
[data-theme="light"] .close-chat { background: rgba(0,0,0,0.05); }
[data-theme="light"] .close-chat:hover { background: rgba(0,0,0,0.1); }
.close-chat svg { width: 18px; height: 18px; }

/* Messages Area */
.chat-messages {
    flex: 1; padding: 1.5rem; overflow-y: auto;
    display: flex; flex-direction: column; gap: 1.2rem;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
[data-theme="light"] .chat-messages { scrollbar-color: rgba(0,0,0,0.1) transparent; }
[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }

.message { display: flex; animation: msgEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(10px); }
@keyframes msgEnter { to { opacity: 1; transform: translateY(0); } }

.message-content {
    padding: 1rem 1.25rem; border-radius: 18px; font-size: 0.95rem; line-height: 1.5; max-width: 85%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.ai-message { justify-content: flex-start; }
.ai-message .message-content {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%); 
    color: var(--foreground);
    border: 1px solid rgba(255,255,255,0.1); 
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
}
[data-theme="light"] .ai-message .message-content {
    background: #f4f4f5; border: 1px solid rgba(0,0,0,0.05);
}
[dir="rtl"] .ai-message .message-content { border-bottom-left-radius: 18px; border-bottom-right-radius: 4px; }

.user-message { justify-content: flex-end; }
.user-message .message-content {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%); 
    color: #ffffff;
    border-bottom-right-radius: 4px; border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}
[dir="rtl"] .user-message .message-content { border-bottom-right-radius: 18px; border-bottom-left-radius: 4px; }

/* Input Area */
.chat-input-area {
    padding: 1.25rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2); position: relative;
}
[data-theme="light"] .chat-input-area { border-top: 1px solid rgba(0,0,0,0.05); background: rgba(0,0,0,0.02); }

.chat-input-wrapper {
    display: flex; align-items: flex-end; gap: 0.75rem; 
    background: rgba(255,255,255,0.05); 
    padding: 0.5rem; padding-left: 1.25rem;
    border-radius: 24px; border: 1px solid rgba(255,255,255,0.1);
    transition: border-color 0.3s, background 0.3s;
}
[dir="rtl"] .chat-input-wrapper { padding-left: 0.5rem; padding-right: 1.25rem; }
.chat-input-wrapper:focus-within {
    border-color: rgba(16, 185, 129, 0.5); background: rgba(255,255,255,0.08);
}
[data-theme="light"] .chat-input-wrapper { background: #ffffff; border: 1px solid rgba(0,0,0,0.1); }
[data-theme="light"] .chat-input-wrapper:focus-within { background: #ffffff; border-color: rgba(16, 185, 129, 0.5); }

#chat-input {
    flex: 1; background: transparent; border: none; color: var(--foreground);
    font-family: inherit; font-size: 0.95rem; resize: none; outline: none;
    max-height: 120px; padding: 0.5rem 0; line-height: 1.4;
}
#chat-input::placeholder { color: var(--foreground-muted); }

.send-btn {
    width: 42px; height: 42px; border-radius: 18px; flex-shrink: 0;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%); 
    color: #ffffff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s, opacity 0.2s, background 0.2s;
}
.send-btn:hover:not(:disabled) { transform: scale(1.05); cursor: pointer; }
.send-btn svg { width: 18px; height: 18px; transform: translateX(-1px); }
[dir="rtl"] .send-btn svg { transform: translateX(1px) rotate(180deg); }
.send-btn:disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.3); transform: scale(1); cursor: not-allowed; }
[data-theme="light"] .send-btn:disabled { background: rgba(0,0,0,0.1); color: rgba(0,0,0,0.3); }

/* Typing Indicator Animation */
.typing-indicator { display: flex; gap: 5px; padding: 1rem 1.25rem !important; align-items: center; justify-content: center; }
.type-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--foreground-muted); animation: typeBlink 1.4s infinite ease-in-out both; }
.type-dot:nth-child(1) { animation-delay: -0.32s; }
.type-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typeBlink { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; background: #10b981; } }

@media (max-width: 768px) {
    .grodd-chatbot { bottom: 1.25rem; right: 1.25rem; }
    [dir="rtl"] .grodd-chatbot { left: 1.25rem; right: auto; }
    .chat-window { width: calc(100vw - 2.5rem); height: 65vh; border-radius: 20px; }
}
