/* ============================================
   IDeep — Apple-inspired Minimal Design
   Dark/Light Mode + RTL + Responsive
   ============================================ */

/* ============================================
   THEME VARIABLES
   ============================================ */
:root {
    --blue: #2D9CDB;
    --blue-light: #5CB8E6;
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-arabic: 'Noto Sans Arabic', 'Inter', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-dark {
    --bg: #060B18;
    --bg-elevated: #0C1425;
    --bg-card: #0F1A2E;
    --accent: #E8F4FD;
    --white: #FFFFFF;
    --gray-100: #E2E8F0;
    --gray-300: #94A3B8;
    --gray-500: #64748B;
    --gray-700: #334155;
    --nav-bg: rgba(6, 11, 24, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.03);
}

.theme-light {
    --bg: #F8FAFC;
    --bg-elevated: #FFFFFF;
    --bg-card: #FFFFFF;
    --accent: #1E293B;
    --white: #0F172A;
    --gray-100: #1E293B;
    --gray-300: #475569;
    --gray-500: #64748B;
    --gray-700: #CBD5E1;
    --nav-bg: rgba(248, 250, 252, 0.88);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --card-hover: rgba(0, 0, 0, 0.03);
}

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

html {
    overflow-x: clip;
    scrollbar-width: thin;
    scrollbar-color: var(--blue) var(--bg);
}

html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--white);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Arabic RTL --- */
.lang-ar { direction: rtl; }
.lang-ar body,
.lang-ar .hero-content,
.lang-ar .about-desc p,
.lang-ar .service-info p,
.lang-ar .project-info p,
.lang-ar .hero-phase p,
.lang-ar .contact-sub { font-family: var(--font-arabic); }

.lang-ar .hero-title,
.lang-ar .about-title,
.lang-ar .services-heading,
.lang-ar .portfolio-header h2,
.lang-ar .team-header h2,
.lang-ar .contact-heading h2,
.lang-ar .hero-phase h2 { font-family: var(--font-arabic); }

/* --- Trilingual --- */
.lang-fr [data-lang-en], .lang-fr [data-lang-ar] { display: none !important; }
.lang-en [data-lang-fr], .lang-en [data-lang-ar] { display: none !important; }
.lang-ar [data-lang-fr], .lang-ar [data-lang-en] { display: none !important; }

/* ============================================
   THREE.JS CANVAS
   ============================================ */
#scene-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.theme-light #scene-canvas { opacity: 0.6; }

/* ============================================
   LOADER
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader.done { pointer-events: none; }

.loader-inner { text-align: center; width: 260px; }

.loader-logo {
    position: relative;
    width: 220px;
    margin: 0 auto 2.4rem;
    padding: 0.6rem 0;
    isolation: isolate;
}

/* Soft radial halo behind the logo */
.loader-logo::before {
    content: '';
    position: absolute;
    inset: -50% -25%;
    background: radial-gradient(ellipse at center,
        rgba(45, 156, 219, 0.4) 0%,
        rgba(45, 156, 219, 0.12) 35%,
        transparent 70%);
    filter: blur(34px);
    opacity: 0;
    z-index: -1;
    animation: logoHalo 3s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

/* Diagonal light sweep that glides across the logo */
.loader-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 50%;
    height: 100%;
    background: linear-gradient(115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 30%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.02) 70%,
        transparent 100%);
    transform: skewX(-20deg);
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0;
    animation: logoShimmer 1.6s cubic-bezier(0.65, 0, 0.35, 1) 1.4s forwards;
}

.loader-logo img {
    width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(18px) scale(0.92);
    filter: blur(14px);
    clip-path: inset(0 100% 0 0);
    animation: logoEntrance 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
    will-change: transform, opacity, filter, clip-path;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.93);
        filter: blur(12px) brightness(1.3);
        clip-path: inset(0 100% 0 0);
    }
    30% {
        opacity: 0.9;
        filter: blur(6px) brightness(1.2);
        clip-path: inset(0 40% 0 0);
    }
    55% {
        opacity: 1;
        filter: blur(2px) brightness(1.1);
        clip-path: inset(0 0 0 0);
    }
    80% {
        filter: blur(0) brightness(1.04);
        transform: translateY(1px) scale(0.998);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0) brightness(1);
        clip-path: inset(0 0 0 0);
    }
}

@keyframes logoHalo {
    0% { opacity: 0; transform: scale(0.65); }
    30% { opacity: 0.7; transform: scale(0.95); }
    55% { opacity: 1; transform: scale(1.08); }
    80% { opacity: 0.85; transform: scale(1.02); }
    100% { opacity: 0.7; transform: scale(1); }
}

@keyframes logoShimmer {
    0% { left: -60%; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { left: 130%; opacity: 0; }
}

.loader-line {
    width: 100%;
    height: 1px;
    background: var(--gray-700);
    overflow: hidden;
}

.loader-line-fill {
    height: 100%;
    width: 0%;
    background: var(--blue);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease,
                background 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
}

.nav.visible { opacity: 1; transform: translateY(0); }

.nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 3rem;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo-img { height: 26px; width: auto; object-fit: contain; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-300);
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--blue);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--gray-700);
    color: var(--gray-300);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }

.theme-dark .theme-icon-light { display: none; }
.theme-light .theme-icon-dark { display: none; }

/* Language Toggle */
.lang-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.lang-sep { color: var(--gray-700); }
.lang-opt { transition: color 0.3s ease; }
.lang-fr .lang-opt[data-lang="fr"],
.lang-en .lang-opt[data-lang="en"],
.lang-ar .lang-opt[data-lang="ar"] { color: var(--white); }

.nav-burger {
    display: none;
    background: none;
    border: none;
    width: 28px;
    height: 16px;
    position: relative;
    z-index: 101;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--white);
    position: absolute;
    left: 0;
    transition: all 0.4s var(--ease-out-expo);
}

.nav-burger span:first-child { top: 0; }
.nav-burger span:last-child { bottom: 0; }

.nav-burger.active span:first-child { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-burger.active span:last-child { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    clip-path: circle(0% at calc(100% - 3rem) 2rem);
    transition: clip-path 0.8s var(--ease-out-expo);
}

.mobile-menu.active {
    clip-path: circle(150% at calc(100% - 3rem) 2rem);
}

.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu li { margin: 1.5rem 0; }

.mobile-menu a {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    color: var(--gray-300);
    transition: color 0.3s ease;
}

.mobile-menu a:hover { color: var(--white); }

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: min(680px, 85%);
    pointer-events: auto;
}

.hero-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-300);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
}

.hero-tag-line {
    width: 40px;
    height: 1px;
    background: var(--blue);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 2rem;
}

.hero-line {
    display: block;
    overflow: visible;
    clip-path: inset(-3% -20% -8% -3%);
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

.hero-line-inner {
    display: block;
    transform: translateY(110%);
}

.hero-line-accent { color: var(--blue); }
.hero-dot { color: var(--blue-light); }

.hero-sub {
    font-size: 1.05rem;
    color: var(--gray-300);
    line-height: 1.7;
    max-width: 440px;
    margin-bottom: 2.5rem;
    opacity: 0;
}

/* Button */
.btn-magnetic {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: 1px solid var(--gray-700);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease;
    opacity: 0;
}

.btn-fill {
    position: absolute;
    inset: 0;
    background: var(--blue);
    border-radius: 50px;
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-out-expo);
}

.btn-magnetic:hover .btn-fill { transform: translateY(0); }
.btn-magnetic:hover { border-color: var(--blue); }

.btn-text, .btn-arrow { position: relative; z-index: 1; }
.btn-arrow { transition: transform 0.3s ease; }
.btn-magnetic:hover .btn-arrow { transform: translateX(4px); }

/* Phase Text Overlays */
.hero-phase {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    z-index: 5;
    max-width: 380px;
    pointer-events: none;
}

.hero-phase-left { left: 5%; }
.hero-phase-right { right: 5%; text-align: right; }

.hero-phase .phase-num {
    display: block;
    color: var(--blue);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    margin-bottom: 0.75rem;
}

.hero-phase h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.hero-phase p {
    color: var(--gray-300);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 340px;
}

.hero-phase-right p { margin-left: auto; }

/* Scroll Indicator */
/* Apple-style luxe scroll indicator */
.hero-scroll-indicator {
    position: fixed;
    bottom: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    font-family: var(--font-body);
    z-index: 80;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s var(--ease-out-expo);
}

.hero-scroll-indicator.visible { opacity: 1; }
.hero-scroll-indicator.hidden { opacity: 0 !important; }

/* Mouse outline */
.scroll-mouse {
    width: 26px;
    height: 42px;
    border: 1.5px solid var(--white);
    border-radius: 14px;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.theme-light .scroll-mouse { border-color: var(--accent); background: rgba(0,0,0,0.04); }

.scroll-mouse-dot {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 3px;
    height: 8px;
    background: var(--blue-light);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scrollMouseDot 2.2s var(--ease-out-expo) infinite;
}

@keyframes scrollMouseDot {
    0% { opacity: 0; transform: translate(-50%, -2px); }
    25% { opacity: 1; transform: translate(-50%, 0); }
    65% { opacity: 1; transform: translate(-50%, 14px); }
    100% { opacity: 0; transform: translate(-50%, 18px); }
}

.scroll-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Bouncing chevrons */
.scroll-chevrons {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -0.3rem;
}

.scroll-chevrons span {
    display: block;
    width: 9px;
    height: 9px;
    border-right: 1.5px solid var(--white);
    border-bottom: 1.5px solid var(--white);
    transform: rotate(45deg);
    margin: -2px 0;
    animation: scrollChevron 2s var(--ease-out-expo) infinite;
    opacity: 0;
}

.scroll-chevrons span:nth-child(2) { animation-delay: 0.15s; }
.scroll-chevrons span:nth-child(3) { animation-delay: 0.3s; }

@keyframes scrollChevron {
    0% { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); }
}

/* Top scroll progress bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
    transform-origin: 0 50%;
    transform: scaleX(0);
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(45, 156, 219, 0.4);
}

/* ============================================
   SHARED SECTION STYLES
   ============================================ */
.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--blue);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1.2rem;
    height: 1px;
    background: var(--blue);
}

.lang-ar .section-label {
    padding-left: 0;
    padding-right: 2rem;
}

.lang-ar .section-label::before {
    left: auto;
    right: 0;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    position: relative;
    padding: 6rem 5%;
    min-height: 80vh;
}

.about-inner {
    max-width: 1100px;
    margin: 0 auto;
}

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

.about-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--gray-100);
    max-width: 700px;
}

.about-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: start;
}

.about-desc p {
    font-size: 1.05rem;
    color: var(--gray-300);
    line-height: 1.85;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.stat-num {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    letter-spacing: 0.05em;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
    position: relative;
    padding: 6rem 5%;
}

.services-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.services-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 4rem;
}

.services-list {
    display: flex;
    flex-direction: column;
}

.service-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    gap: 2rem;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-subtle);
    transition: background 0.4s ease;
}

.service-row:last-child {
    border-bottom: 1px solid var(--border-subtle);
}

.service-num {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-500);
}

.service-info h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.service-info p {
    font-size: 1rem;
    color: var(--gray-300);
    line-height: 1.7;
}

.service-icon {
    font-size: 1.3rem;
    color: var(--blue);
    text-align: right;
}

.service-row:hover .service-info h3 { color: var(--blue); }

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio {
    position: relative;
    padding: 6rem 5%;
}

.portfolio-inner {
    max-width: 1280px;
    margin: 0 auto;
}

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

.portfolio-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
}

/* Sticky preview pane on the LEFT (16:9 horizontal) + scrollable titles on RIGHT */
.portfolio-showcase {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 3rem;
    position: relative;
    align-items: start;
}

.portfolio-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-subtle);
}

.project {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.8rem;
    align-items: center;
    padding: 2.4rem 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    overflow: hidden;
    transition: padding 0.6s var(--ease-out-expo), background 0.6s ease;
}

/* Hide the inner image on desktop — sticky preview pane handles visuals */
.project .project-img { display: none; }

/* Animated accent bar that grows on hover/active */
.project::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 1px;
    width: 0;
    background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
    transition: width 0.7s var(--ease-out-expo);
    pointer-events: none;
}

.project:hover::after,
.project.is-active::after { width: 100%; }

/* Num at left of the row */
.project-num {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.14em;
    align-self: start;
    padding-top: 0.6rem;
    transition: color 0.5s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
    min-width: 36px;
}

.project:hover .project-num,
.project.is-active .project-num {
    color: var(--blue);
    transform: translateY(-2px);
}

/* Text info column */
.project-info {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.7s var(--ease-out-expo);
}

.lang-ar .project:hover .project-info,
.lang-ar .project.is-active .project-info { transform: translateX(-10px); }
.project:hover .project-info,
.project.is-active .project-info { transform: translateX(10px); }

.project-cat {
    order: 1;
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-500);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    font-weight: 800;
    line-height: 1.02;
    color: var(--white);
    letter-spacing: -0.025em;
    transition: color 0.5s var(--ease-out-expo);
    order: 2;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.project:hover .project-info h3,
.project.is-active .project-info h3 { color: var(--blue-light); }

.project-year {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-500);
    letter-spacing: 0.06em;
    text-transform: none;
    transition: color 0.5s ease;
}

.project:hover .project-year,
.project.is-active .project-year { color: var(--blue); }

/* Hide the description text on desktop (not part of the list visual) */
.project-info p { display: none; }

.project-stack {
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

.project:hover .project-stack,
.project.is-active .project-stack { opacity: 1; }

.project-stack span {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-300);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    letter-spacing: 0.02em;
    transition: border-color 0.4s ease, color 0.4s ease, background 0.4s ease;
}

.project:hover .project-stack span,
.project.is-active .project-stack span {
    border-color: rgba(45, 156, 219, 0.3);
    color: var(--blue-light);
    background: rgba(45, 156, 219, 0.06);
}

.theme-light .project-stack span { background: rgba(0, 0, 0, 0.03); }

.project-cat {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    order: 1;
}

.project-arrow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    font-size: 1rem;
    transition: all 0.6s var(--ease-out-expo);
    flex-shrink: 0;
}

/* Arrow: appended OUTSIDE .project-info (direct child of .project), grid column 3 */
.project-arrow {
    order: 0;
}

.project:hover .project-arrow,
.project.is-active .project-arrow {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    transform: rotate(-45deg) scale(1.05);
    box-shadow: 0 12px 30px rgba(45, 156, 219, 0.35);
}

.lang-ar .project:hover .project-arrow,
.lang-ar .project.is-active .project-arrow { transform: rotate(45deg) scale(1.05); }

/* Sticky preview pane — large 16:9 horizontal on the LEFT */
.portfolio-preview {
    position: sticky;
    top: 14vh;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.7s ease;
}

.portfolio-preview.has-active {
    box-shadow:
        0 50px 120px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(45, 156, 219, 0.25),
        0 0 80px rgba(45, 156, 219, 0.15);
}

.portfolio-preview-inner {
    position: absolute;
    inset: 0;
}

.portfolio-preview-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.7s var(--ease-out-expo), transform 1.4s var(--ease-out-expo);
}

.portfolio-preview-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.portfolio-preview-img.exiting {
    opacity: 0;
    transform: scale(0.98);
    z-index: 1;
}

.portfolio-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(45, 156, 219, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(92, 184, 230, 0.08) 0%, transparent 55%);
    z-index: 0;
}

.portfolio-preview::after {
    content: '↗';
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
    pointer-events: none;
}

.portfolio-preview.has-active::after {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   TEAM — Cinematic Scroll Showcase
   ============================================ */
.team {
    position: relative;
    padding: 6rem 5% 0;
}

.team-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.team-header { margin-bottom: 3rem; }

.team-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
}

/* Tall scroll container (height set by JS = members × viewport) */
.team-cinema {
    position: relative;
    width: 100%;
}

/* Sticky stage = full viewport while you scroll through it */
.team-cinema-stage {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
    z-index: 5;
}

/* Luxe framed photo — visible at intro on mobile, fades out as user zooms in */
.team-cinema-frame {
    display: none; /* Desktop: hidden — background cover handles everything */
}

/* Blurred backdrop — same image scaled to fill, heavily blurred + darkened */
.team-cinema-blur {
    position: absolute;
    inset: -8%;
    background-image: url('../ideep%20equipe.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(50px) brightness(0.45) saturate(1.2);
    transform: scale(1.15);
    z-index: 0;
}

.team-cinema-photo {
    position: absolute;
    inset: 0;
    background-image: url('../ideep%20equipe.jpeg');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    will-change: background-size, background-position, filter;
    transition: filter 0.6s ease;
    z-index: 1;
}

/* Cinematic vignette */
.team-cinema-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.55) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 25%, transparent 60%, rgba(0,0,0,0.85) 100%);
    z-index: 2;
}

/* Subtle film grain */
.team-cinema-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    z-index: 3;
}

/* Glow ring around the focused face */
.team-cinema-focus {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1.5px solid rgba(232, 244, 253, 0.4);
    box-shadow:
        0 0 0 1px rgba(45, 156, 219, 0.15),
        0 0 60px 10px rgba(45, 156, 219, 0.25),
        inset 0 0 40px rgba(45, 156, 219, 0.08);
    transform: translate(-50%, -50%) scale(0.7);
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: screen;
}

.team-cinema-focus.visible {
    opacity: 1;
}

/* Info card - single, persistent, content swapped */
.team-cinema-info {
    position: absolute;
    left: 6%;
    bottom: 8%;
    z-index: 5;
    max-width: 480px;
    pointer-events: none;
}

.lang-ar .team-cinema-info { left: auto; right: 6%; }

.team-cinema-info-inner {
    position: relative;
    padding: 2rem 0;
}

.team-cinema-num {
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-light);
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.team-cinema-name {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.8vw, 4rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.team-cinema-role {
    display: block;
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    font-weight: 500;
    color: var(--blue-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.team-cinema-duties {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-cinema-duties li {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    padding-left: 1.2rem;
    position: relative;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.lang-ar .team-cinema-duties li { padding-left: 0; padding-right: 1.2rem; }

.team-cinema-duties li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 1px;
    background: var(--blue-light);
}

.lang-ar .team-cinema-duties li::before { left: auto; right: 0; }

/* Animate-in micro effect when member changes */
.team-cinema-info.animate-in .team-cinema-name,
.team-cinema-info.animate-in .team-cinema-role,
.team-cinema-info.animate-in .team-cinema-duties li,
.team-cinema-info.animate-in .team-cinema-num,
.team-cinema-info.animate-in .team-cinema-email {
    animation: cinemaFadeUp 0.7s var(--ease-out-expo) backwards;
}
.team-cinema-info.animate-in .team-cinema-num { animation-delay: 0s; }
.team-cinema-info.animate-in .team-cinema-name { animation-delay: 0.05s; }
.team-cinema-info.animate-in .team-cinema-role { animation-delay: 0.18s; }
.team-cinema-info.animate-in .team-cinema-duties li:nth-child(1) { animation-delay: 0.26s; }
.team-cinema-info.animate-in .team-cinema-duties li:nth-child(2) { animation-delay: 0.32s; }
.team-cinema-info.animate-in .team-cinema-duties li:nth-child(3) { animation-delay: 0.38s; }
.team-cinema-info.animate-in .team-cinema-email { animation-delay: 0.46s; }

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

/* Intro card — shows full team at the start */
.team-cinema-intro {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(var(--intro-y, 0px));
    z-index: 5;
    text-align: center;
    pointer-events: none;
    padding: 0 1.5rem;
}

.team-cinema-intro-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--blue-light);
    margin-bottom: 1.2rem;
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(232, 244, 253, 0.25);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.team-cinema-intro-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: 800;
    line-height: 0.95;
    color: #fff;
    letter-spacing: -0.025em;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
}

.team-cinema-intro-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.team-cinema-intro-hint i {
    animation: hintBounce 2s ease-in-out infinite;
}

.team-cinema-email {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.6rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.team-cinema-email i { color: var(--blue-light); font-size: 0.8rem; }
.team-cinema-email:hover { border-color: var(--blue); color: #fff; background: rgba(45, 156, 219, 0.18); }

/* Progress bar - elegant horizontal segments */
.team-cinema-progress {
    position: absolute;
    right: 6%;
    bottom: 8%;
    z-index: 5;
    width: clamp(180px, 22vw, 280px);
}

.lang-ar .team-cinema-progress { right: auto; left: 6%; }

.team-cinema-progress-track {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.team-cinema-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--blue);
    transition: width 0.4s var(--ease-out-expo);
}

.team-cinema-progress-segments {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
}

.team-cinema-progress-segments span {
    transition: color 0.4s ease;
}

.team-cinema-progress-segments span.active {
    color: var(--blue-light);
}

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

/* Light theme tweaks */
.theme-light .team-cinema-photo { filter: brightness(0.95); }
.theme-light .team-cinema-vignette {
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.4) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 25%, transparent 60%, rgba(0,0,0,0.7) 100%);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    position: relative;
    padding: 8rem 5% 5rem;
    text-align: center;
}

.contact-inner {
    max-width: 800px;
    margin: 0 auto;
}

.contact-heading h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.05;
}

.contact-line {
    display: block;
    overflow: hidden;
}

.contact-line-inner {
    display: block;
    transform: translateY(110%);
}

.contact-sub {
    font-size: 1.1rem;
    color: var(--gray-300);
    line-height: 1.7;
    margin: 2rem auto;
    max-width: 500px;
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 2rem;
    transition: opacity 0.3s ease;
}

.contact-email:hover { opacity: 0.7; }

.contact-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-socials a {
    font-size: 1.2rem;
    color: var(--gray-500);
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-socials a:hover { color: var(--white); transform: translateY(-2px); }

/* ============================================
   FOOTER
   ============================================ */
/* ============================================
   FOOTER — luxury
   ============================================ */
.footer {
    position: relative;
    padding: 6rem 5% 2.5rem;
    background:
        radial-gradient(1200px 400px at 50% 0%, rgba(45, 156, 219, 0.09), transparent 60%),
        linear-gradient(180deg, rgba(8, 14, 28, 0) 0%, rgba(6, 11, 24, 0.6) 40%, rgba(4, 8, 18, 0.9) 100%);
    overflow: hidden;
    isolation: isolate;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 1100px);
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 15%,
        rgba(45, 156, 219, 0.55) 50%,
        rgba(255, 255, 255, 0.08) 85%,
        transparent 100%);
}

.footer-glow {
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    width: 620px;
    height: 360px;
    background: radial-gradient(ellipse at center, rgba(45, 156, 219, 0.22) 0%, transparent 65%);
    filter: blur(30px);
    pointer-events: none;
    z-index: -1;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
    gap: 4rem 3rem;
    padding-bottom: 3.5rem;
}

.footer-brand { max-width: 360px; }

.footer-brand .footer-logo {
    width: auto;
    height: 42px;
    opacity: 1;
    display: block;
    margin-bottom: 1.4rem;
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--gray-500);
    margin-bottom: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.01em;
}

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

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(10px);
}

.footer-socials a:hover {
    color: var(--blue-light);
    border-color: rgba(45, 156, 219, 0.5);
    background: rgba(45, 156, 219, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 156, 219, 0.15);
}

.footer-col-title {
    font-family: var(--font-heading, var(--font-body));
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--accent);
    margin: 0 0 1.4rem;
    position: relative;
    padding-bottom: 0.9rem;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, var(--blue) 0%, transparent 100%);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-links li,
.footer-links a {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--gray-500);
    font-weight: 300;
    letter-spacing: 0.015em;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.footer-links i {
    font-size: 0.75rem;
    color: var(--blue);
    width: 14px;
}

.footer-col-contact .footer-links { margin-bottom: 1.6rem; }

.footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(45, 156, 219, 0.35);
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.12) 0%, rgba(45, 156, 219, 0.04) 100%);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.footer-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.25) 0%, rgba(45, 156, 219, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.footer-cta:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(45, 156, 219, 0.2);
}

.footer-cta:hover::before { opacity: 1; }

.footer-cta i {
    position: relative;
    font-size: 0.7rem;
    transition: transform 0.4s ease;
}

.footer-cta:hover i { transform: translateX(4px); }

.footer-cta > span:not([data-lang-fr]):not([data-lang-en]):not([data-lang-ar]),
.footer-cta span { position: relative; }

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 20%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.06) 80%,
        transparent 100%);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 2rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--gray-600);
    font-weight: 300;
    letter-spacing: 0.03em;
}

.footer-copy { display: flex; align-items: center; gap: 0.6rem; }
.footer-sep { opacity: 0.4; }

.footer-made {
    font-style: italic;
    color: var(--gray-500);
    letter-spacing: 0.04em;
}

.footer-top-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(10px);
}

.footer-top-btn:hover {
    border-color: rgba(45, 156, 219, 0.5);
    background: rgba(45, 156, 219, 0.08);
    color: var(--blue-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(45, 156, 219, 0.18);
}

/* Light mode adjustments */
[data-theme="light"] .footer {
    background:
        radial-gradient(1200px 400px at 50% 0%, rgba(45, 156, 219, 0.1), transparent 60%),
        linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(240, 244, 250, 0.7) 100%);
}
[data-theme="light"] .footer-socials a,
[data-theme="light"] .footer-top-btn { border-color: rgba(0, 0, 0, 0.08); background: rgba(255, 255, 255, 0.6); }
[data-theme="light"] .footer-divider { background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent); }

/* Responsive */
@media (max-width: 980px) {
    .footer { padding: 4.5rem 5% 2rem; }
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 3rem 2rem;
        padding-bottom: 2.5rem;
    }
    .footer-brand { grid-column: 1 / -1; max-width: 100%; }
}

/* Loader logo scales down on mobile */
@media (max-width: 640px) {
    .loader-inner { width: 200px; }
    .loader-logo { width: 170px; }
    .loader-logo img { width: 170px; }
    .footer-cta { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
    .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-bottom {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }
    .footer-copy { justify-content: center; flex-wrap: wrap; }
}

/* ============================================
   FEATURED / SIGNATURE PROJECTS
   ============================================ */
.featured {
    position: relative;
    padding: 8rem 5% 2rem;
}

.featured-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.featured-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.featured-header .section-label {
    display: inline-block;
    margin-bottom: 1.2rem;
}

.featured-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    font-weight: 800;
    line-height: 0.98;
    color: var(--white);
    letter-spacing: -0.025em;
    margin-bottom: 1.4rem;
}

.featured-sub {
    font-size: 1.05rem;
    color: var(--gray-300);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

.featured-stack {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

/* One card */
.featured-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 3rem;
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(45, 156, 219, 0.08) 0%, transparent 55%),
        var(--bg-card);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
    transition: transform 0.8s var(--ease-out-expo),
                box-shadow 0.8s var(--ease-out-expo),
                border-color 0.6s ease;
}

.featured-card:hover {
    transform: translateY(-6px);
    border-color: rgba(45, 156, 219, 0.35);
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(45, 156, 219, 0.25),
        0 0 80px rgba(45, 156, 219, 0.15);
}

/* Alternate layout: 2nd card flipped */
.featured-card:nth-child(even) {
    grid-template-columns: 1fr 1.2fr;
}
.featured-card:nth-child(even) .featured-card-visual { order: 2; }
.featured-card:nth-child(even) .featured-card-content { order: 1; }

/* Vertical layout: visual on top, content below (stacked full-width) */
.featured-card.featured-card-vertical,
.featured-stack .featured-card.featured-card-vertical:nth-child(even) {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
    padding: 2.5rem;
}
.featured-card-vertical .featured-card-visual {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    aspect-ratio: 4 / 3;
    order: 1 !important;
}
.featured-card-vertical .featured-card-content {
    order: 2 !important;
    align-items: center;
    text-align: center;
}
.lang-ar .featured-card-vertical .featured-card-content {
    align-items: center;
    text-align: center;
}
.featured-card-vertical .featured-card-actions {
    justify-content: center;
}
.featured-card-vertical .featured-card-content {
    align-items: flex-start;
    text-align: left;
}
.lang-ar .featured-card-vertical .featured-card-content {
    align-items: flex-end;
    text-align: right;
}

.featured-card-visual {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    transform: scale(1);
    transition: transform 1s var(--ease-out-expo);
}

.featured-card:hover .featured-card-visual { transform: scale(1.015); }

.featured-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s var(--ease-out-expo), filter 0.8s ease;
    display: block;
}

.featured-card:hover .featured-card-img {
    transform: scale(1.05);
    filter: brightness(1.08) saturate(1.1);
}

.featured-card-badge {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lang-ar .featured-card-badge { left: auto; right: 1.2rem; }

.featured-card-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue-light);
    box-shadow: 0 0 8px var(--blue-light);
    animation: badgePulse 2s ease-in-out infinite;
}

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

.featured-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 80%, rgba(45, 156, 219, 0.25) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.7s var(--ease-out-expo);
    pointer-events: none;
    mix-blend-mode: screen;
}

.featured-card:hover .featured-card-glow { opacity: 1; }

/* ===== TRIO COMPOSITION (3 phone-format 9:16 images, center forward) ===== */
.featured-card-visual-trio {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.06) 0%, rgba(0, 0, 0, 0.4) 100%);
    padding: 0;
    overflow: hidden;
}

.trio {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trio-img {
    position: absolute;
    aspect-ratio: 9 / 16;
    height: 78%;
    border-radius: 22px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.9s var(--ease-out-expo);
    will-change: transform;
}

.trio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Center: forward, larger, no rotation */
.trio-center {
    z-index: 3;
    height: 92%;
    transform: translate(0, 0) scale(1);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.18),
        0 0 60px rgba(45, 156, 219, 0.25);
}

/* Left: behind, tilted, offset */
.trio-left {
    z-index: 1;
    height: 76%;
    transform: translate(-58%, 4%) rotate(-9deg) scale(0.92);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    filter: brightness(0.82) saturate(0.95);
}

/* Right: behind, tilted opposite, offset */
.trio-right {
    z-index: 2;
    height: 76%;
    transform: translate(58%, 4%) rotate(9deg) scale(0.92);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    filter: brightness(0.82) saturate(0.95);
}

/* Hover: spread the cards apart slightly + lift center */
.featured-card:hover .trio-center {
    transform: translate(0, -3%) scale(1.02);
}
.featured-card:hover .trio-left {
    transform: translate(-66%, 0) rotate(-12deg) scale(0.94);
    filter: brightness(0.92) saturate(1);
}
.featured-card:hover .trio-right {
    transform: translate(66%, 0) rotate(12deg) scale(0.94);
    filter: brightness(0.92) saturate(1);
}

/* Override the basic featured-card-img zoom on hover for trio (no full-image zoom) */
.featured-card-visual-trio + .featured-card-content,
.featured-card:hover .featured-card-visual-trio { transform: none; }
.featured-card-visual-trio .featured-card-img { display: none; }

/* ===== TRIO LANDSCAPE — horizontal tablet frames (16:10) for website screenshots ===== */
.featured-card-visual-trio-landscape .trio-img {
    aspect-ratio: 16 / 10;
    height: auto;
    width: 70%;
    border-radius: 14px;
}
.featured-card-visual-trio-landscape .trio-center {
    width: 78%;
    height: auto;
    transform: translate(0, 0) scale(1);
}
.featured-card-visual-trio-landscape .trio-left {
    width: 64%;
    height: auto;
    transform: translate(-44%, 8%) rotate(-6deg) scale(0.9);
}
.featured-card-visual-trio-landscape .trio-right {
    width: 64%;
    height: auto;
    transform: translate(44%, 8%) rotate(6deg) scale(0.9);
}
.featured-card:hover .featured-card-visual-trio-landscape .trio-center {
    transform: translate(0, -3%) scale(1.02);
}
.featured-card:hover .featured-card-visual-trio-landscape .trio-left {
    transform: translate(-50%, 4%) rotate(-8deg) scale(0.92);
    filter: brightness(0.92) saturate(1);
}
.featured-card:hover .featured-card-visual-trio-landscape .trio-right {
    transform: translate(50%, 4%) rotate(8deg) scale(0.92);
    filter: brightness(0.92) saturate(1);
}
.featured-card-visual-trio-landscape .trio-img img {
    object-position: top center;
}


/* ===== DESKTOP STACK (3 landscape screens, front center, layered with perspective) ===== */
.featured-card-visual-desktop {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.06) 0%, rgba(0, 0, 0, 0.4) 100%);
    padding: 0;
    overflow: hidden;
    perspective: 1200px;
}

.desktop-stack {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.desktop-screen {
    position: absolute;
    aspect-ratio: 16 / 10;
    width: 82%;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: transform 0.9s var(--ease-out-expo);
    will-change: transform;
}

.desktop-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

/* Back screen: furthest, darkest, slight tilt */
.desktop-back {
    z-index: 1;
    width: 78%;
    transform: translate(-22%, -18%) rotate(-5deg) scale(0.85);
    filter: brightness(0.65) saturate(0.85);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Middle screen: mid depth, slight right tilt */
.desktop-mid {
    z-index: 2;
    width: 80%;
    transform: translate(22%, -8%) rotate(6deg) scale(0.9);
    filter: brightness(0.8) saturate(0.95);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Front screen: biggest, centered, forward */
.desktop-front {
    z-index: 3;
    width: 86%;
    transform: translate(0, 14%) scale(1);
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.18),
        0 0 80px rgba(45, 156, 219, 0.3);
}

/* Hover: spread & lift */
.featured-card:hover .desktop-back {
    transform: translate(-28%, -22%) rotate(-7deg) scale(0.88);
    filter: brightness(0.75) saturate(0.95);
}
.featured-card:hover .desktop-mid {
    transform: translate(28%, -12%) rotate(8deg) scale(0.93);
    filter: brightness(0.9) saturate(1);
}
.featured-card:hover .desktop-front {
    transform: translate(0, 10%) scale(1.03);
}

.featured-card-visual-desktop + .featured-card-content,
.featured-card:hover .featured-card-visual-desktop { transform: none; }
.featured-card-visual-desktop .featured-card-img { display: none; }

.featured-card-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.featured-card-num {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue-light);
    letter-spacing: 0.2em;
    margin-bottom: -0.3rem;
}

.featured-card-cat {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-500);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.featured-card-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.8vw, 3.4rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: var(--white);
    margin: 0;
}

.featured-card-desc {
    font-size: 1rem;
    color: var(--gray-300);
    line-height: 1.65;
    max-width: 520px;
}

.featured-card-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.featured-card-stack span {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--blue-light);
    background: rgba(45, 156, 219, 0.08);
    border: 1px solid rgba(45, 156, 219, 0.22);
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
}

.theme-light .featured-card-stack span {
    color: var(--blue);
    background: rgba(45, 156, 219, 0.06);
}

.featured-card-actions {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.featured-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.6rem;
    border-radius: 50px;
    background: var(--blue);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s ease, background 0.4s ease;
    box-shadow: 0 10px 30px rgba(45, 156, 219, 0.3);
}

.featured-card:hover .featured-card-cta {
    transform: translateX(4px);
    box-shadow: 0 14px 40px rgba(45, 156, 219, 0.45);
}

.lang-ar .featured-card:hover .featured-card-cta { transform: translateX(-4px); }

.featured-card-cta i { font-size: 0.8rem; }

.featured-card-live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.3rem;
    border-radius: 50px;
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    color: var(--gray-300);
    transition: border-color 0.4s ease, color 0.4s ease;
}

.featured-card-live:hover {
    border-color: var(--blue);
    color: var(--blue-light);
}

.featured-card-live i { font-size: 0.7rem; }

/* --- Placeholder card (2nd project coming soon) --- */
.featured-card-placeholder {
    cursor: default;
}

.featured-card-placeholder:hover {
    transform: none;
    border-color: var(--border-subtle);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

.featured-card-placeholder .featured-card-visual {
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.08) 0%, rgba(92, 184, 230, 0.03) 100%);
}

.placeholder-art {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.placeholder-grid {
    position: absolute;
    inset: 10%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
    opacity: 0.35;
}

.placeholder-grid span {
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.2) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(45, 156, 219, 0.15);
    border-radius: 8px;
    animation: placeholderPulse 3s ease-in-out infinite;
}

.placeholder-grid span:nth-child(1) { animation-delay: 0s; }
.placeholder-grid span:nth-child(2) { animation-delay: 0.15s; }
.placeholder-grid span:nth-child(3) { animation-delay: 0.3s; }
.placeholder-grid span:nth-child(4) { animation-delay: 0.45s; }
.placeholder-grid span:nth-child(5) { animation-delay: 0.6s; }
.placeholder-grid span:nth-child(6) { animation-delay: 0.75s; }
.placeholder-grid span:nth-child(7) { animation-delay: 0.9s; }
.placeholder-grid span:nth-child(8) { animation-delay: 1.05s; }
.placeholder-grid span:nth-child(9) { animation-delay: 1.2s; }

@keyframes placeholderPulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.placeholder-icon {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-light);
    font-size: 1.6rem;
    box-shadow: 0 10px 40px rgba(45, 156, 219, 0.25);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
    margin: 3rem auto 2.5rem;
    max-width: 720px;
    text-align: left;
}

.lang-ar .contact-form { text-align: right; }

.form-honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem 1.5rem;
}

.form-field {
    position: relative;
    padding-top: 1.2rem;
}

.form-field-full { grid-column: 1 / -1; }

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.7rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--white);
    outline: none;
    transition: border-color 0.4s ease;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-field select {
    cursor: pointer;
    padding-right: 1.5rem;
}

.form-field select option {
    background: var(--bg-elevated);
    color: var(--white);
}

.form-field label {
    position: absolute;
    left: 0;
    top: 1.9rem;
    font-size: 0.95rem;
    color: var(--gray-500);
    font-family: var(--font-body);
    pointer-events: none;
    transition: top 0.35s var(--ease-out-expo), font-size 0.35s var(--ease-out-expo), color 0.35s ease;
}

.lang-ar .form-field label { left: auto; right: 0; }

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label,
.form-field select:focus + label,
.form-field select:valid + label {
    top: 0;
    font-size: 0.72rem;
    color: var(--blue);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-bottom-color: var(--blue);
}

.form-line {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 1px;
    background: var(--blue);
    transition: width 0.5s var(--ease-out-expo);
}

.form-field input:focus ~ .form-line,
.form-field select:focus ~ .form-line,
.form-field textarea:focus ~ .form-line { width: 100%; }

.form-chevron {
    position: absolute;
    right: 0;
    bottom: 0.8rem;
    color: var(--gray-500);
    pointer-events: none;
    font-size: 0.9rem;
}

.lang-ar .form-chevron { right: auto; left: 0; }

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.form-submit {
    opacity: 1 !important;
    cursor: pointer;
    background: none;
    font-family: var(--font-body);
}

.form-submit-loading { display: none; }
.form-submit.loading .form-submit-label { display: none; }
.form-submit.loading .form-submit-loading { display: inline; }
.form-submit.loading { pointer-events: none; opacity: 0.7 !important; }

.contact-fallback {
    font-size: 0.85rem;
    color: var(--gray-500);
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.contact-fallback:hover { color: var(--blue); }

.form-status {
    margin-top: 1.5rem;
    padding: 0;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.5rem;
}

.form-status.success { color: #4ade80; }
.form-status.error { color: #f87171; }

/* ============================================
   CASE STUDY MODAL
   ============================================ */
.case-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    visibility: hidden;
    pointer-events: none;
}

.case-modal.open {
    visibility: visible;
    pointer-events: auto;
}

.case-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 11, 24, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.6s var(--ease-out-expo);
}

.theme-light .case-modal-backdrop { background: rgba(15, 23, 42, 0.55); }

.case-modal.open .case-modal-backdrop { opacity: 1; }

.case-modal-shell {
    position: absolute;
    inset: 4vh 6vw;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
    transform: scale(0.96) translateY(20px);
    opacity: 0;
    transition: transform 0.7s var(--ease-out-expo), opacity 0.5s ease;
}

.case-modal.open .case-modal-shell {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.case-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.lang-ar .case-modal-close { right: auto; left: 1.5rem; }
.case-modal-close:hover { background: var(--blue); transform: rotate(90deg); }
.case-modal-close span {
    position: absolute;
    width: 16px;
    height: 1.5px;
    background: #fff;
}
.case-modal-close span:first-child { transform: rotate(45deg); }
.case-modal-close span:last-child { transform: rotate(-45deg); }

.case-modal-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--blue) transparent;
}

.case-modal-scroll::-webkit-scrollbar { width: 6px; }
.case-modal-scroll::-webkit-scrollbar-track { background: transparent; }
.case-modal-scroll::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

.case-modal-hero {
    position: relative;
    height: 50vh;
    min-height: 320px;
    overflow: hidden;
}

.case-modal-hero-img {
    position: absolute;
    inset: 0;
}

.case-modal-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 11, 24, 0.1) 0%, rgba(6, 11, 24, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem 4rem;
}

.case-modal-cat {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--blue-light);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.case-modal-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
    letter-spacing: -0.02em;
}

.case-modal-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    padding: 4rem;
}

.case-modal-meta {
    position: sticky;
    top: 4rem;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-right: 1rem;
}

.case-meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.case-meta-row:last-child { border-bottom: none; }

.case-meta-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-500);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.case-meta-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
}

.case-meta-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.case-meta-stack span {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--blue-light);
    background: rgba(45, 156, 219, 0.1);
    border: 1px solid rgba(45, 156, 219, 0.25);
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.theme-light .case-meta-stack span {
    background: rgba(45, 156, 219, 0.08);
    color: var(--blue);
}

.case-modal-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.case-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.case-block-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.case-block p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--gray-100);
    white-space: pre-line;
}

.case-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.case-block ul li {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--gray-100);
    padding-left: 1.5rem;
    position: relative;
}

.lang-ar .case-block ul li { padding-left: 0; padding-right: 1.5rem; }

.case-block ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 8px;
    height: 1px;
    background: var(--blue);
}

.lang-ar .case-block ul li::before { left: auto; right: 0; }

/* Case study gallery (inside modal) */
.case-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}

.case-gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.case-gallery-item {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transition: transform 0.7s var(--ease-out-expo), box-shadow 0.7s ease;
}

.case-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.case-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.case-cta {
    margin-top: 1.5rem;
    padding: 2.5rem;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.case-cta h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
}

.case-cta-btn { opacity: 1 !important; }

/* Body scroll lock when modal open */
body.modal-open { overflow: hidden; }

/* ============================================
   ANIMATION UTILITIES
   ============================================ */
[data-anim] {
    opacity: 0;
    transform: translateY(20px);
}

[data-reveal] {
    overflow: hidden;
}

.split-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.15em;
}

.split-word-inner {
    display: inline-block;
    transform: translateY(110%);
    will-change: transform;
}

[data-reveal-lines],
.services-heading,
.portfolio-header h2,
.team-header h2 {
    opacity: 1;
}

/* ============================================
   RESPONSIVE — Tablet (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .about-body { grid-template-columns: 1fr; gap: 3rem; }
    .about-stats { flex-direction: row; gap: 2rem; flex-wrap: wrap; }
    .portfolio-grid { gap: 1.5rem; }
    .team-cinema-info { max-width: 70%; bottom: 12%; }
    .team-cinema-focus { width: 140px; height: 140px; }
}

/* ============================================
   RESPONSIVE — Mobile (768px)
   ============================================ */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-burger { display: block; }
    .nav { padding: 1.2rem 1.5rem; }
    .nav.scrolled { padding: 0.8rem 1.5rem; }

    .hero-content { max-width: 90%; }
    .hero-line { font-size: clamp(1.8rem, 8vw, 3rem); }
    .hero-tag { font-size: 0.75rem; }

    .hero-phase { max-width: 260px; }
    .hero-phase-left { left: 3%; }
    .hero-phase-right { right: 3%; }
    .hero-phase h2 { font-size: 1.4rem; }
    .hero-phase p { font-size: 0.85rem; }

    .about, .services, .portfolio { padding: 4rem 5%; }
    .team { padding: 3rem 5% 0; }
    .team-header { margin-bottom: 1.2rem; }

    /* Featured cards mobile: stack vertically */
    .featured { padding: 5rem 5% 1rem; }
    .featured-header { margin-bottom: 3rem; }
    .featured-stack { gap: 3rem; }
    .featured-card,
    .featured-card:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 1.8rem;
        padding: 1.6rem;
        border-radius: 22px;
    }
    .featured-card:nth-child(even) .featured-card-visual { order: 1; }
    .featured-card:nth-child(even) .featured-card-content { order: 2; }
    .featured-card-visual { aspect-ratio: 4/3; }
    .featured-card-visual-trio .trio-img { border-radius: 16px; }
    .trio-center { height: 88%; }
    .trio-left { height: 70%; transform: translate(-52%, 4%) rotate(-8deg) scale(0.88); }
    .trio-right { height: 70%; transform: translate(52%, 4%) rotate(8deg) scale(0.88); }
    .featured-card:hover .trio-left { transform: translate(-58%, 0) rotate(-10deg) scale(0.9); }
    .featured-card:hover .trio-right { transform: translate(58%, 0) rotate(10deg) scale(0.9); }

    /* Landscape trio mobile overrides */
    .featured-card-visual-trio-landscape .trio-center { width: 86%; height: auto; }
    .featured-card-visual-trio-landscape .trio-left { width: 70%; height: auto; transform: translate(-38%, 12%) rotate(-5deg) scale(0.88); }
    .featured-card-visual-trio-landscape .trio-right { width: 70%; height: auto; transform: translate(38%, 12%) rotate(5deg) scale(0.88); }
    .featured-card:hover .featured-card-visual-trio-landscape .trio-left { transform: translate(-44%, 8%) rotate(-7deg) scale(0.9); }
    .featured-card:hover .featured-card-visual-trio-landscape .trio-right { transform: translate(44%, 8%) rotate(7deg) scale(0.9); }
    .featured-card-content { gap: 1rem; }
    .featured-card-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }
    .featured-card-desc { font-size: 0.92rem; }
    .featured-card-actions { gap: 0.8rem; }
    .featured-card-cta { padding: 0.8rem 1.3rem; font-size: 0.8rem; }
    .featured-card-live { padding: 0.8rem 1.1rem; font-size: 0.75rem; }
    .placeholder-icon { width: 64px; height: 64px; font-size: 1.3rem; }

    /* Portfolio mobile: match desktop layout — image LEFT + title RIGHT, per row */
    .portfolio-showcase { grid-template-columns: 1fr; gap: 0; }
    .portfolio-preview { display: none; }

    .project {
        /* image left | info right */
        grid-template-columns: 42% 1fr;
        gap: 1rem;
        padding: 1.4rem 0;
        align-items: start;
    }

    /* Show inline image on the left */
    .project .project-img {
        display: block;
        aspect-ratio: 16 / 10;
        border-radius: 12px;
        overflow: hidden;
        background: #000;
    }
    .project .project-img img {
        width: 100%; height: 100%; object-fit: cover; object-position: top center;
    }
    .project .project-img .project-overlay { display: none; }

    /* Hide the num column bar (redundant with info header) */
    .project-num { display: none; }

    .project-info {
        gap: 0.35rem;
        transform: none !important;
    }
    .project-info h3 {
        font-size: clamp(1.1rem, 4.8vw, 1.5rem);
        line-height: 1.05;
    }
    .project-year { font-size: 0.68rem; }
    .project-cat { font-size: 0.58rem; margin-bottom: 0; }
    .project-stack { gap: 0.3rem; margin-top: 0.2rem; opacity: 1; }
    .project-stack span { font-size: 0.58rem; padding: 0.2rem 0.55rem; }

    /* Arrow hidden on mobile (tap the card to open modal) */
    .project-arrow { display: none; }

    /* Scroll indicator: smaller & higher on mobile */
    .hero-scroll-indicator { bottom: 3.5rem; gap: 0.6rem; }
    .scroll-mouse { width: 22px; height: 36px; border-radius: 12px; }
    .scroll-mouse-dot { top: 6px; width: 2.5px; height: 7px; }
    .scroll-label { font-size: 0.6rem; letter-spacing: 0.18em; }
    .scroll-chevrons span { width: 7px; height: 7px; }

    .team-cinema-info { left: 5%; right: 5%; max-width: none; bottom: 14%; }
    .team-cinema-name { font-size: clamp(2rem, 9vw, 3.2rem); }
    .team-cinema-progress { right: 5%; bottom: 5%; width: 50%; }
    .team-cinema-focus { width: 120px; height: 120px; }
    .team-cinema-email { font-size: 0.78rem; padding: 0.5rem 0.95rem; }

    /* Luxe frame: visible on mobile during intro - aligned to TOP of stage, no empty space */
    .team-cinema-frame {
        display: block;
        position: absolute;
        left: 50%;
        top: 3vh;
        transform: translateX(-50%);
        width: 94vw;
        height: auto;
        max-width: 94vw;
        max-height: 70vh;
        aspect-ratio: 1040 / 694;
        object-fit: cover;
        object-position: center;
        z-index: 2;
        border-radius: 22px;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.12),
            0 30px 90px rgba(0, 0, 0, 0.55),
            0 0 80px rgba(45, 156, 219, 0.18);
    }

    /* Intro card sits RIGHT BELOW the photo, no empty space.
       Photo height = 94vw / 1.498 ≈ 62.7vw, so intro top = 3vh + 62.7vw + spacing */
    .team-cinema-intro {
        position: absolute;
        left: 50%;
        top: calc(3vh + 63vw + 3.5rem);
        bottom: auto;
        transform: translateX(-50%) translateY(var(--intro-y, 0px));
        text-align: center;
        padding: 0 1.2rem;
        width: 100%;
    }
    .team-cinema-intro-title {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }
    .team-cinema-intro-tag {
        margin-bottom: 0.6rem;
        font-size: 0.6rem;
        padding: 0.35rem 0.85rem;
    }
    .team-cinema-intro-hint { font-size: 0.65rem; }

    .team-cinema-stage.zoomed .team-cinema-frame { opacity: 0 !important; }

    /* Hide the background-photo at intro on mobile (frame covers it),
       JS reveals it as zoom progresses */
    .team-cinema-photo { opacity: 0; transition: opacity 0.4s ease; }
    .team-cinema-stage.zoomed .team-cinema-photo { opacity: 1; }

    .service-row { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.5rem 0; }
    .service-num, .service-icon { display: none; }

    .contact-heading h2 { font-size: clamp(2rem, 10vw, 4rem); }


    /* Contact form mobile */
    .form-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .form-footer { flex-direction: column; align-items: stretch; gap: 1.2rem; }
    .form-submit { justify-content: center; }
    .contact-fallback { text-align: center; }

    /* Case modal mobile */
    .case-modal-shell { inset: 2vh 3vw; border-radius: 18px; }
    .case-modal-hero { height: 38vh; min-height: 240px; }
    .case-modal-hero-overlay { padding: 1.8rem 1.5rem; }
    .case-modal-body {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2rem 1.5rem;
    }
    .case-modal-meta { position: static; padding-right: 0; gap: 1.2rem; }
    .case-modal-content { gap: 2.5rem; }
    .case-block p { font-size: 1rem; }
    .case-cta { padding: 1.8rem; }
    .case-cta h3 { font-size: 1.2rem; }
    .case-modal-close { top: 1rem; right: 1rem; width: 38px; height: 38px; }
    .lang-ar .case-modal-close { right: auto; left: 1rem; }
}

/* ============================================
   RESPONSIVE — Small Mobile (480px)
   ============================================ */
@media (max-width: 480px) {
    .nav { padding: 1rem 1rem; }
    .nav.scrolled { padding: 0.7rem 1rem; }
    .nav-right { gap: 0.6rem; }
    .theme-toggle { width: 32px; height: 32px; font-size: 0.75rem; }
    .lang-toggle { font-size: 0.7rem; }

    .hero-content { max-width: 95%; }
    .hero-line { font-size: clamp(1.6rem, 7vw, 2.5rem); }
    .hero-sub { font-size: 0.9rem; }
    .btn-magnetic { padding: 0.85rem 1.5rem; font-size: 0.8rem; }

    .about-title { font-size: clamp(1.4rem, 5vw, 2rem); }
    .about-desc p { font-size: 0.9rem; }
    .about-stats { flex-direction: column; }
    .stat { gap: 1rem; }
    .stat-num { font-size: clamp(2rem, 8vw, 2.5rem); }

    .services-heading { font-size: clamp(1.6rem, 7vw, 2.5rem); }
    .service-info h3 { font-size: 1.1rem; }
    .service-info p { font-size: 0.85rem; }

    .portfolio-header h2 { font-size: clamp(1.6rem, 7vw, 2.5rem); }
    .project-info { padding: 1.2rem 1.5rem; }
    .project-info h3 { font-size: 1.1rem; }
    .project-info p { font-size: 0.85rem; }

    .team-header h2 { font-size: clamp(1.6rem, 7vw, 2.5rem); }
    .team-cinema-name { font-size: clamp(1.8rem, 9vw, 2.6rem); }
    .team-cinema-role { font-size: 0.78rem; }

    .contact-heading h2 { font-size: clamp(1.8rem, 9vw, 3rem); }
    .contact-sub { font-size: 0.9rem; }
    .contact-email { font-size: clamp(1rem, 4vw, 1.4rem); }

    /* Scroll indicator extra small */
    .hero-scroll-indicator { bottom: 3rem; gap: 0.5rem; }
    .scroll-mouse { width: 20px; height: 32px; }
    .scroll-label { font-size: 0.55rem; letter-spacing: 0.15em; }
    .scroll-progress-bar { height: 1.5px; }

    /* Form fields tighter on tiny screens */
    .form-grid { gap: 1.2rem; }
    .form-field { padding-top: 1rem; }
    .form-field label { top: 1.7rem; font-size: 0.88rem; }
    .form-field input, .form-field select, .form-field textarea { font-size: 0.95rem; }

    /* Case modal: full-screen on tiny screens */
    .case-modal-shell { inset: 0; border-radius: 0; }
    .case-modal-hero { height: 32vh; min-height: 200px; }
    .case-modal-hero-overlay { padding: 1.4rem 1.2rem; }
    .case-modal-title { font-size: clamp(1.6rem, 8vw, 2.4rem); }
    .case-modal-body { padding: 1.5rem 1.2rem; gap: 2rem; }
    .case-block p { font-size: 0.9rem; }
    .case-cta { padding: 1.4rem; }
    .case-cta h3 { font-size: 1.05rem; }

    /* Team intro card smaller */
    .team-cinema-intro-title { font-size: clamp(2rem, 10vw, 3rem); }
    .team-cinema-intro-tag { font-size: 0.65rem; padding: 0.4rem 0.9rem; }

    /* Hero phase overlays smaller */
    .hero-phase { max-width: 88%; }
}
