/* === CRITICAL CSS (Above the fold) === */
:root {
    --primary-color: #C5A059; /* Lustrous Pearl Gold */
    --primary-light: #E8D5B5;
    --primary-dark: #8C6F3D;
    --accent-playful: #8B5CF6; /* Playful Electric Violet */
    --secondary-color: #6366F1; /* Elegant Indigo */
    --secondary-light: #A5B4FC;
    --dark-bg: #070809; /* Deep Obsidian Black */
    --light-bg: #FCFBFA; /* Soft Pearl */
    --text-dark: #121417;
    --text-light: #F9FAFB;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-dark: rgba(255, 255, 255, 0.03);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-colored: 0 15px 35px -10px rgba(197, 160, 89, 0.4);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-bg);
    transition: background-color 0.5s ease, color 0.3s ease;
    overflow-x: hidden;
    position: relative;
    cursor: none;
}

/* Arabic Font Override */
[lang="ar"] body, [lang="ar"] .typed-text, [lang="ar"] .form-input, [lang="ar"] .btn {
    font-family: 'Alexandria', 'Inter', sans-serif;
    letter-spacing: 0 !important;
}
[lang="ar"] .logo, [lang="ar"] .section-title, [lang="ar"] .service-title, [lang="ar"] .section-subtitle {
    font-family: 'Alexandria', 'Cormorant Garamond', serif;
    letter-spacing: 0 !important;
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    will-change: transform;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.cursor-hover-dot {
    transform: translate(-50%, -50%) scale(1.5) !important;
    background-color: transparent !important;
}

.cursor-hover-outline {
    width: 60px;
    height: 60px;
    background-color: transparent;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(226, 163, 70, 0.2);
    mix-blend-mode: difference;
}

body.dark-mode {
    background: var(--dark-bg);
    color: var(--text-light);
}

/* Subtle background noise / gradient */
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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: overlay;
}

/* Scroll Progress indicator */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-playful), var(--secondary-color));
    width: 0%;
    z-index: 10001;
    /* Above navigation */
    box-shadow: 0 0 15px rgba(181, 141, 81, 0.6);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s ease-out;
}

/* Skip to main content for accessibility */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 9999;
}

.skip-to-main:focus {
    top: 10px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(252, 251, 250, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 0.8rem 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 1px solid rgba(226, 163, 70, 0.15);
}

.dark-mode .main-nav {
    background: rgba(11, 15, 25, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Navbar logo: circular badge image */
.logo-img-nav {
    height: 90px;
    width: 90px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 4px 18px rgba(197, 160, 89, 0.6));
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.logo:hover .logo-img-nav {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 8px 22px rgba(197, 160, 89, 0.75));
}

/* Footer logo: transparent version, wider */
.footer-logo-link {
    display: inline-flex;
}

.logo-img-footer {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(197, 160, 89, 0.4));
    transition: transform 0.35s ease, filter 0.35s ease;
    margin-bottom: 0.75rem;
}

.footer-logo-link:hover .logo-img-footer {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 20px rgba(197, 160, 89, 0.65));
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover,
.nav-link.active {
    background: transparent;
    color: var(--primary-color);
}

.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    font-size: 1.2rem;
    color: inherit;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--primary-color);
    color: white;
}

.theme-toggle .fa-sun {
    display: none;
}

.dark-mode .theme-toggle .fa-moon {
    display: none;
}

.dark-mode .theme-toggle .fa-sun {
    display: inline-block;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: inherit;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 2rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Hero Video Background */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(248, 250, 252, 0.15) 0%,
            rgba(248, 250, 252, 0.5) 60%,
            var(--light-bg) 100%);
    z-index: 1;
    pointer-events: none;
}

.dark-mode .hero-overlay {
    background: linear-gradient(to bottom,
            rgba(11, 15, 25, 0.1) 0%,
            rgba(11, 15, 25, 0.45) 60%,
            var(--dark-bg) 100%);
}

.dark-mode .hero-video {
    opacity: 0.85;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-character {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 540px;
}

.hero-spline {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    filter: drop-shadow(0 20px 60px rgba(226, 163, 70, 0.2));
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-playful));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-colored);
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3.5rem, 6vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(
        135deg, 
        var(--primary-light) 0%, 
        var(--primary-color) 25%, 
        var(--accent-playful) 50%, 
        var(--primary-color) 75%, 
        var(--primary-light) 100%
    );
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(197, 160, 89, 0.2);
    letter-spacing: -2px;
    transform: translateZ(0);
    animation: textShimmer 8s linear infinite;
}

@keyframes textShimmer {
    to { background-position: 400% center; }
}

.typed-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    margin-top: 0.5rem;
    min-height: 3rem;
    color: var(--text-dark);
    -webkit-text-fill-color: currentColor;
    background: none;
    position: relative;
    display: inline-block;
}

.typed-text::after {
    content: '|';
    position: absolute;
    right: -10px;
    color: var(--primary-color);
    animation: typingBlink 1s step-end infinite;
}

[dir="rtl"] .typed-text::after {
    right: auto;
    left: -10px;
}

@keyframes typingBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.dark-mode .typed-text {
    color: var(--text-light);
}

.hero-description {
    font-size: 1.2rem;
    color: inherit;
    opacity: 0.8;
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 3rem 0;
}

.stat {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 115, 85, 0.2);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(20px);
}

.dark-mode .stat {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--glass-bg-dark);
}

.stat:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color), var(--accent-playful), var(--primary-dark));
    background-size: 300% 100%;
    color: white;
    box-shadow: 0 8px 16px -6px rgba(197, 160, 89, 0.4);
    animation: btnGradientMove 6s ease infinite;
}

@keyframes btnGradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 10px 20px -5px var(--primary-color);
}

.btn-secondary {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.dark-mode .btn-secondary {
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sections */
.section {
    padding: 6rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.1;
    background: linear-gradient(
        90deg, 
        currentColor 0%, 
        var(--primary-color) 50%, 
        currentColor 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    transition: background-position 0.6s ease;
}

.section-title:hover {
    background-position: -100% center;
    -webkit-text-fill-color: transparent;
}

.dark-mode .section-title {
    color: var(--text-light);
}

/* Services Cards with 3D tilt effect (via JS) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    border: 1px solid rgba(226, 163, 70, 0.2);
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: var(--shadow-sm);
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0) rotateY(0);
    position: relative;
    display: flex;
    flex-direction: column;
}

.dark-mode .service-card {
    border-color: rgba(255, 255, 255, 0.05);
    background: var(--glass-bg-dark);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 0;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon,
.service-title,
.service-features,
p {
    position: relative;
    z-index: 1;
}

.service-card:hover {
    box-shadow: 
        var(--shadow-lg), 
        0 20px 40px -10px rgba(197, 160, 89, 0.35), 
        0 0 20px rgba(139, 92, 246, 0.15);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .service-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.service-icon {
    width: 100px;
    height: 100px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 15px rgba(197, 160, 89, 0.3));
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Cormorant Garamond', serif;
}

.service-features {
    list-style: none;
    margin-top: auto;
    padding-top: 1.5rem;
}

.service-features li {
    padding: 0.45rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.service-features i {
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Portfolio */
.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: inherit;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
}

.portfolio-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(139, 115, 85, 0.2);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(40px) scale(0.9) rotateX(10deg);
    transform-origin: top center;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
}

.portfolio-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(197, 160, 89, 0.3);
    border-color: var(--primary-color);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transform-origin: center;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.12) rotate(-1deg);
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.portfolio-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ── Creative Showcase (Animated Cards) ─────────────────────────────── */
.creative-showcase-section {
    padding: 8rem 2rem;
    background: var(--dark-bg);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(226, 163, 70, 0.12);
    border-bottom: 1px solid rgba(226, 163, 70, 0.12);
}

/* Drifting background glow orbs */
.cs-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    animation: csOrbDrift 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.cs-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.15), transparent 70%);
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.cs-orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -3.5s;
}

.cs-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.1), transparent 70%);
    top: 50%;
    left: 45%;
    animation-delay: -6s;
}

.cs-orb-4 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
    top: 20%;
    right: 15%;
    animation-delay: -9s;
}

@keyframes csOrbDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -25px) scale(1.08);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.93);
    }

    75% {
        transform: translate(15px, 30px) scale(1.05);
    }
}

.cs-header {
    position: relative;
    z-index: 1;
    margin-bottom: 4rem;
}

.cs-title {
    color: var(--text-light) !important;
    -webkit-text-fill-color: var(--text-light) !important;
    background: none !important;
}

/* Card grid */
.cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Individual floating card */
.cs-card {
    background: rgba(255, 255, 255, 0.032);
    border-radius: 22px;
    padding: 2.5rem;
    border: 1px solid rgba(197, 160, 89, 0.18);
    position: relative;
    overflow: hidden;
    animation: csCardFloat 7s ease-in-out infinite;
    animation-delay: var(--cs-delay, 0s);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    cursor: default;
}

@keyframes csCardFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    30% {
        transform: translateY(-10px) rotate(0.3deg);
    }

    70% {
        transform: translateY(-6px) rotate(-0.2deg);
    }
}

.cs-card:hover {
    transform: translateY(-18px) scale(1.02) !important;
    box-shadow: 0 30px 60px rgba(197, 160, 89, 0.22), 0 0 0 1px rgba(139, 92, 246, 0.3);
    border-color: var(--primary-color);
}

/* Icon container with ring pulse */
.cs-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--cs-hue, rgba(226, 163, 70, 0.15)), rgba(255, 255, 255, 0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(226, 163, 70, 0.3);
    transition: var(--transition);
    animation: csIconPulse 3.5s ease-in-out infinite;
    animation-delay: var(--cs-delay, 0s);
}

@keyframes csIconPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(139, 92, 246, 0);
    }
}

.cs-card:hover .cs-card-icon {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.3), rgba(139, 92, 246, 0.2));
    transform: scale(1.1) rotate(-5deg);
}

.cs-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.45rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.cs-card p {
    color: rgba(241, 245, 249, 0.6);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* Animated progress bar */
.cs-progress {
    margin-top: 1.8rem;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.cs-progress-bar {
    height: 100%;
    max-width: var(--bar-width, 90%);
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color), var(--primary-light));
    border-radius: 2px;
    animation: csBarPulse 4s ease-in-out infinite;
    animation-delay: var(--bar-delay, 0s);
    will-change: opacity, transform;
}

@keyframes csBarPulse {
    0% {
        transform: scaleX(0);
        opacity: 0;
        transform-origin: left;
    }

    25% {
        transform: scaleX(1);
        opacity: 1;
        transform-origin: left;
    }

    70% {
        transform: scaleX(1);
        opacity: 0.9;
        transform-origin: left;
    }

    100% {
        transform: scaleX(0);
        opacity: 0;
        transform-origin: right;
    }
}

/* Card hover inner glow */
.cs-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.cs-card:hover .cs-glow {
    opacity: 1;
}

/* ── Motion Showcase (Video + Character + Spline) ───────────────────── */
.motion-section {
    padding: 6rem 2rem;
    position: relative;
    background: var(--light-bg);
}

body.dark-mode .motion-section {
    background: var(--dark-bg);
}

.motion-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Left side (Video + Character) */
.motion-video-side {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.motion-video-frame {
    width: 100%;
    max-width: 500px;
    height: 350px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--glass-bg);
    transform: perspective(1000px) rotateY(5deg);
    transition: transform 0.4s ease;
}

body.dark-mode .motion-video-frame {
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(139, 92, 246, 0.15);
}

.motion-video-frame:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.motion-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.motion-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Base Character Container */
/* Base Character Container (REACTIVE) */
.css-character {
    position: relative;
    width: 150px;
    height: 180px;
    margin-top: -40px;
    z-index: 2;
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.2));
    animation: chrFloat 4s ease-in-out infinite;
    --chr-x: 0;
    --chr-y: 0;
}

/* Glowing Blob Behind Character */
.chr-glow-blob {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(226, 163, 70, 0.4), transparent 70%);
    top: 20px;
    left: 15px;
    filter: blur(20px);
    z-index: -1;
    animation: chrPulse 3s ease-in-out infinite alternate;
}

/* Head & Face */
.chr-head {
    position: absolute;
    width: 80px;
    height: 75px;
    background: #fce8d5;
    border-radius: 40px 40px 30px 30px;
    top: 20px;
    left: 35px;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
    /* Reactivity: Head Tilt */
    transform: rotate(calc(var(--chr-x) * 15deg)) translateY(calc(var(--chr-y) * 5px));
    transition: transform 0.1s ease-out;
}

body.dark-mode .chr-head {
    background: #e6c5a8;
}

.chr-face {
    position: relative;
    width: 100%;
    height: 100%;
    /* Face shift for depth */
    transform: translate(calc(var(--chr-x) * 10px), calc(var(--chr-y) * 5px));
    transition: transform 0.08s ease-out;
}

/* Hair */
.chr-hair {
    position: absolute;
    width: 90px;
    height: 40px;
    background: #2a2a2a;
    border-radius: 40px 40px 10px 10px;
    top: -10px;
    left: -5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.chr-hair::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: #2a2a2a;
    border-radius: 50%;
    top: 10px;
    right: -10px;
}

/* Eyes */
.chr-eye {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #1a1a1a;
    border-radius: 50%;
    top: 35px;
    overflow: hidden;
}

.chr-eye-l { left: 18px; }
.chr-eye-r { right: 18px; }

.chr-pupil {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    top: 15%;
    left: 15%;
    /* Pupillary tracking */
    transform: translate(calc(var(--chr-x) * 4px), calc(var(--chr-y) * 4px));
    transition: transform 0.05s ease-out;
}

/* Cheeks & Blush */
.chr-cheeks {
    position: absolute;
    top: 48px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
}

.chr-blush {
    width: 12px;
    height: 6px;
    background: rgba(255, 107, 107, 0.4);
    border-radius: 50%;
    filter: blur(2px);
}

/* Mouth */
.chr-mouth {
    position: absolute;
    width: 12px;
    height: 6px;
    background: #e25555;
    border-radius: 0 0 10px 10px;
    bottom: 15px;
    left: 34px;
    transition: 0.3s ease;
}

/* Body / Torso */
.chr-body {
    position: absolute;
    width: 60px;
    height: 65px;
    background: var(--primary-color);
    border-radius: 20px 20px 30px 30px;
    top: 90px;
    left: 45px;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.15);
    z-index: 1;
    transform: rotate(calc(var(--chr-x) * 5deg));
    transition: transform 0.15s ease-out;
}

/* Arms */
.chr-arm {
    position: absolute;
    width: 18px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 10px;
    top: 10px;
}

/* The Waving Arm */
.chr-arm-r {
    right: -25px;
    transform-origin: top center;
    animation: chrWave 2.5s infinite;
    background: var(--primary-color);
    box-shadow: -2px 5px 10px rgba(0, 0, 0, 0.1);
}

.chr-arm-r::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fce8d5;
    border-radius: 50%;
    bottom: -10px;
    left: -1px;
}

body.dark-mode .chr-arm-r::after {
    background: #e6c5a8;
}

.chr-arm-l {
    left: -10px;
    transform: rotate(20deg);
}

/* Sparkle Stars */
.chr-star {
    position: absolute;
    color: var(--primary-color);
    font-size: 1.2rem;
    opacity: 0;
}

.st1 {
    top: 0;
    left: 10px;
    animation: chrStar 2s 0s infinite;
}

.st2 {
    top: 40px;
    right: 0;
    font-size: 0.8rem;
    animation: chrStar 2s 0.7s infinite;
}

.st3 {
    bottom: 50px;
    left: 0;
    animation: chrStar 3s 1.2s infinite;
}

.st4 {
    top: 20px;
    left: 120px;
    animation: chrStar 2.5s 0.4s infinite;
}


/* Character Animations */
@keyframes chrFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes chrWave {
    0%, 100% { transform: rotate(-20deg); }
    10% { transform: rotate(50deg); }
    20% { transform: rotate(10deg); }
    30% { transform: rotate(50deg); }
    40% { transform: rotate(-20deg); }
}

@keyframes chrBlink {
    0%, 95%, 100% { transform: scaleY(1); }
    97% { transform: scaleY(0.1); }
}

@keyframes chrPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes chrStar {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1) rotate(90deg); opacity: 1; }
    100% { transform: scale(0) rotate(180deg); opacity: 0; }
}


/* Right side (Text & Spline) */
.motion-spline-side {
    display: flex;
    flex-direction: column;
}

.motion-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

body.dark-mode .motion-heading {
    color: var(--text-light);
}

.motion-em {
    font-style: italic;
    color: var(--primary-color);
}

.motion-text-top p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    max-width: 500px;
}

.motion-spline-wrap {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: transparent;
    position: relative;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 163, 70, 0.2);
}

.motion-spline {
    width: 100%;
    height: 100%;
}

@media (max-width: 992px) {
    .motion-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .motion-video-side {
        order: 2;
        margin-top: 2rem;
    }

    .motion-spline-side {
        order: 1;
        text-align: center;
        align-items: center;
    }

    .motion-heading {
        margin-bottom: 1rem;
    }

    .motion-text-top p {
        margin: 0 auto 1.5rem auto;
    }
}


/* About */
#about {
    position: relative;
    overflow: hidden;
}

#about-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -2;
    opacity: 0.5;
    pointer-events: none;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.about-grid,
#about .section-header {
    position: relative;
    z-index: 1;
}

.about-grid {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 115, 85, 0.2);
    transition: var(--transition);
}

.contact-method:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

[dir="rtl"] .contact-method:hover {
    transform: translateX(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-playful));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-form {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    border: 1px solid rgba(139, 115, 85, 0.2);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-select {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: var(--radius-sm);
    color: inherit;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.2);
}

.error-message {
    color: #b33;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* Footer */
.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(139, 115, 85, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--primary-color);
    opacity: 1;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(139, 115, 85, 0.2);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px) scale(1.1);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 115, 85, 0.2);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Keyframes only for blob, no fade on hero-text */
@keyframes blobMove {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    50% {
        transform: translate(-50px, 150px) scale(1.1) rotate(45deg);
    }

    100% {
        transform: translate(-100px, -50px) scale(0.9) rotate(90deg);
    }
}

@keyframes blobMove2 {
    0% {
        transform: translate(0, 0) scale(0.9) rotate(0deg);
    }

    50% {
        transform: translate(150px, -100px) scale(1.2) rotate(-45deg);
    }

    100% {
        transform: translate(50px, -150px) scale(1) rotate(-90deg);
    }
}

/* Responsive */
@media (max-width: 1024px) {

    .hero-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(250, 249, 247, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid rgba(139, 115, 85, 0.2);
    }

    .dark-mode .nav-links {
        background: rgba(10, 10, 10, 0.98);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero {
        padding-top: 100px;
    }

    .section {
        padding: 4rem 1rem;
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

[dir="rtl"] .chatbot-container {
    right: auto;
    left: 30px;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--dark-bg);
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: var(--shadow-colored);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: var(--light-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

[dir="rtl"] .chatbot-window {
    right: auto;
    left: 0;
}

.chatbot-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

body.dark-mode .chatbot-window {
    background: #1a1b1f;
    /* slightly lighter than main dark bg */
    border-color: rgba(255, 255, 255, 0.1);
}

.chatbot-header {
    background: var(--primary-color);
    color: var(--dark-bg);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-header button {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}

.chatbot-messages {
    padding: 1rem;
    height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bot-msg {
    background: rgba(92, 123, 153, 0.1);
    /* Steel Blue tint */
    border-left: 3px solid var(--secondary-color);
    padding: 0.8rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
    font-size: 0.95rem;
    align-self: flex-start;
    max-width: 85%;
}

[dir="rtl"] .bot-msg {
    border-left: none;
    border-right: 3px solid var(--secondary-color);
    border-radius: var(--radius-sm) 0 var(--radius-sm) var(--radius-sm);
}

.user-msg {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-left: none;
    border-right: 3px solid var(--primary-dark);
    border-radius: var(--radius-sm) 0 var(--radius-sm) var(--radius-sm);
    align-self: flex-end;
}

[dir="rtl"] .user-msg {
    border-right: none;
    border-left: 3px solid var(--primary-dark);
    border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
}

.chatbot-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chat-opt {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

[dir="rtl"] .chat-opt {
    text-align: right;
}

body.dark-mode .chat-opt {
    color: var(--text-light);
}

.chat-opt:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

/* Print Styles */
@media print {

    .main-nav,
    .theme-toggle,
    .cta-buttons,
    .footer {
        display: none;
    }

    .hero,
    .section {
        padding: 0;
        min-height: auto;
    }

    body {
        color: #000;
        background: #fff;
    }
}