:root {
    /* Light Mode Variables based on Logo */
    --color-surface-tint: 106 177 201;
    /* Logo Muted Teal */
    --color-background: 250 249 246;
    /* Alabaster White */
    --color-outline: 139 144 160;
    --color-error: 186 26 26;
    --color-primary-container: 226 242 249;
    /* Very light teal */
    --color-inverse-primary: 63 190 239;
    /* Logo Bright Cyan */
    --color-on-background: 34 40 43;
    /* Very dark slate */
    --color-on-error: 255 255 255;
    --color-on-primary: 255 255 255;
    --color-primary: 56 128 153;
    /* Darkened Muted Teal from Logo for contrast */
    --color-secondary: 79 94 103;
    /* Logo Dark Slate */
    --color-tertiary: 106 177 201;
    /* Logo Muted Teal unaltered */
    --color-surface-container-lowest: 255 255 255;
    --color-surface-container-low: 244 245 247;
    --color-surface-container: 236 240 242;
    --color-surface-container-high: 228 233 236;
    --color-surface-container-highest: 218 225 229;
    --color-outline-variant: 195 198 207;
    --color-on-surface-variant: 79 94 103;
    /* Slate grey text */
    --shadow-ambient: rgba(79, 94, 103, 0.05);
    /* Tinted shadows */
    --shadow-strong: rgba(79, 94, 103, 0.15);
}

.dark {
    /* Dark Mode Variables based on Logo */
    --color-surface-tint: 63 190 239;
    /* Logo Bright Cyan */
    --color-background: 13 17 20;
    /* Deep slate background */
    --color-outline: 79 94 103;
    /* Logo Dark Slate */
    --color-error: 255 180 171;
    --color-primary-container: 26 50 64;
    /* Deep teal container */
    --color-inverse-primary: 56 128 153;
    --color-on-background: 235 240 242;
    /* Soft white */
    --color-on-error: 105 0 5;
    --color-on-primary: 13 17 20;
    /* Dark text on primary button */
    --color-primary: 63 190 239;
    /* Logo Bright Cyan */
    --color-secondary: 106 177 201;
    /* Logo Muted Teal */
    --color-tertiary: 147 165 176;
    /* Lightened Slate Grey */
    --color-surface-container-lowest: 8 11 13;
    --color-surface-container-low: 18 24 28;
    --color-surface-container: 23 32 38;
    --color-surface-container-high: 32 44 51;
    --color-surface-container-highest: 42 56 66;
    --color-outline-variant: 65 71 85;
    --color-on-surface-variant: 172 188 198;
    /* Light slate text */
    --shadow-ambient: rgba(0, 0, 0, 0.4);
    --shadow-strong: rgba(0, 0, 0, 0.6);
}

/* Smooth Theme Transition */
html.theme-transition,
html.theme-transition *,
html.theme-transition *:before,
html.theme-transition *:after {
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    transition-delay: 0s !important;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Premium Background Noise */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

.glass-card {
    background: rgba(var(--color-surface-container) / 0.7);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(var(--color-on-background) / 0.05);
    box-shadow: 0 8px 32px 0 var(--shadow-ambient);
}

.hero-network {
    background-image: radial-gradient(circle at center, rgb(var(--color-primary)) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    opacity: 0.05;
}

/* Magnetic Button Base Animation */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Interactive Card Tilt & Glow */
.tilt-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.tilt-card:hover {
    transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 20px 40px var(--shadow-strong), inset 0 0 20px rgba(var(--color-primary) / 0.1);
}

/* Scroll Revel Animations */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: revealUp 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Timeline Progress Fill */
.timeline-line {
    height: 2px;
    background: linear-gradient(90deg, rgb(var(--color-primary)) 0%, transparent 100%);
    width: 0%;
    transition: width 1s ease-out;
}

/* Spotlight Effect Base */
.spotlight-area {
    position: relative;
    overflow: hidden;
}

.spotlight {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--color-primary) / 0.05) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Parallax Floating */
.parallax-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

.parallax-float-fast {
    animation: floatFast 6s ease-in-out infinite;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(-3deg);
    }
}

@keyframes floatFast {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-10px) rotate(7deg);
    }
}

/* Footer Gradient & Animation */
.footer-elite {
    background: linear-gradient(135deg,
            rgba(var(--color-background) / 1) 0%,
            rgb(var(--color-primary) / 0.08) 50%,
            rgba(var(--color-background) / 1) 100%);
    position: relative;
    overflow: hidden;
}

.footer-elite::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(var(--color-primary) / 0.05) 25%,
            rgba(var(--color-tertiary) / 0.1) 50%,
            rgba(var(--color-primary) / 0.05) 75%,
            transparent 100%);
    animation: moveGradient 15s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes moveGradient {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(33.33%);
    }
}

/* Marquee Animation */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 6rem;
    animation: scroll 40s linear infinite;
    width: max-content;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Client Logos Adaptive Style */
.client-logo {
    filter: grayscale(1) contrast(0.5) opacity(0.5);
    mix-blend-mode: multiply;
    /* Hides white backgrounds in Light Mode */
    transition: all 0.5s ease;
}

.client-logo:hover {
    filter: grayscale(0) contrast(1) opacity(1);
    mix-blend-mode: normal;
    transform: scale(1.1);
}

.dark .client-logo {
    filter: grayscale(1) invert(1) brightness(1.5) opacity(0.6);
    mix-blend-mode: screen;
    /* Hides black/dark backgrounds in Dark Mode */
}

.dark .client-logo:hover {
    filter: grayscale(0) invert(0) brightness(1) opacity(1);
    mix-blend-mode: normal;
}

/* Premium Splash Screen */
.splash-screen {
    position: fixed;
    inset: 0;
    background: #0a0c12;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
}

.splash-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
}

.splash-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: pulseLogo 2s ease-in-out infinite;
    filter: brightness(1.2) drop-shadow(0 0 20px rgba(56, 128, 153, 0.4));
}

.splash-loader-ring {
    position: absolute;
    inset: -10px;
    border: 2px solid transparent;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spinLoader 1.5s linear infinite;
}

.splash-loader-ring-outer {
    position: absolute;
    inset: -20px;
    border: 1px solid rgba(var(--color-primary) / 0.1);
    border-radius: 50%;
}

.splash-text {
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.5em;
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.5;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes spinLoader {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

html[dir="rtl"],
html[dir="rtl"] .font-headline,
html[dir="rtl"] .font-body {
    font-family: 'Tajawal', sans-serif !important;
}