/* 
======================================================
TEKNAWI - Ultra Advanced Global Design System
======================================================
*/

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --accent-glow: rgba(244, 63, 94, 0.4);

    --bg-base: #020617;
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.2);

    --text-main: #f8fafc;
    --text-muted: #cbd5e1;

    --cursor-color: #f8fafc;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom one */
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body[lang="en"] {
    font-family: 'Outfit', sans-serif;
}

/* Ultra-Advanced Magnetic Cursor */
.custom-cursor {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(14, 165, 233, 0.4);
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
        height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
        background-color 0.4s, border-color 0.4s,
        box-shadow 0.4s;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.2), inset 0 0 10px rgba(14, 165, 233, 0.2);
}

.custom-cursor.hover {
    width: 80px;
    height: 80px;
    background-color: rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.3), inset 0 0 15px rgba(244, 63, 94, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cursor-dot {
    width: 4px;
    height: 4px;
    background-color: var(--secondary);
    box-shadow: 0 0 8px var(--secondary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.cursor-hover .cursor-dot {
    background-color: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

/* Cosmic Background Particles & Gradient */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    background: radial-gradient(circle at 50% 50%, #0a0f24 0%, #020617 100%);
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.05;
    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");
}

/* Orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.25;
    animation: float 20s infinite alternate ease-in-out;
    will-change: transform;
    z-index: -2;
}

.orb-1 {
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--primary);
}

.orb-2 {
    bottom: -20%;
    right: -20%;
    width: 50vw;
    height: 50vw;
    background: var(--secondary);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: var(--accent);
    opacity: 0.15;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(15vw, 15vh) scale(1.1);
    }
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 120px 0;
}

/* Global Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 25px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    z-index: 100;
    transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s, backdrop-filter 0.5s, border-bottom 0.5s;
}

header.scrolled {
    padding: 15px 5%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 26px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    position: relative;
    z-index: 10;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-light);
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

.lang-toggle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 600;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: 0.4s;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-highlight);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Typography Helpers */
.gradient-text {
    background: linear-gradient(to right, #ffffff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.highlight-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title {
    font-size: clamp(40px, 6vw, 70px);
    font-weight: 900;
    text-align: center;
    margin-bottom: 80px;
    line-height: 1.1;
    letter-spacing: -1px;
}

/* Buttons */
.btn {
    padding: 18px 45px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: white;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-highlight);
    transform: translateY(-5px);
}

/* Global Language Switcher Logic (CSS side) */
[lang="en"] .ar {
    display: none !important;
}

[lang="ar"] .en {
    display: none !important;
}

[lang="ar"] header,
[lang="ar"] .nav-links {
    flex-direction: row-reverse;
}

/* Desktop Only Cursor reset */
@media (max-width: 1024px) {

    .custom-cursor,
    .cursor-dot {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }

    a,
    button {
        cursor: pointer !important;
    }
}