:root {
    /* Colors */
    --color-primary: #121212;
    --color-accent: #FF5722;
    --color-bg: #F9F9F9;
    --color-bg-secondary: #FFFFFF;
    --color-text-main: #121212;
    --color-text-muted: #666666;
    --color-border: #E0E0E0;

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-arabic: 'IBM Plex Sans Arabic', sans-serif;
}

[dir="rtl"] {
    --font-main: 'IBM Plex Sans Arabic', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* RTL Helpers */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    /* Minimal, not pill */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: #333;
}

.btn-accent {
    background-color: var(--color-accent);
    color: #fff;
}

.btn-accent:hover {
    filter: brightness(1.1);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-text-main);
    color: var(--color-text-main);
}

.btn-outline:hover {
    background-color: var(--color-text-main);
    color: #fff;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

nav .logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    color: var(--color-primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--color-accent);
}

.lang-switch {
    border: 1px solid var(--color-border);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Sections General */
.section-padding {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.justify-center {
    justify-content: center;
}

.bg-dark {
    background-color: #1a1a1a;
    color: #ffffff;
}

.bg-gray {
    background-color: #f0f0f0;
}

.text-white {
    color: #ffffff;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-lg);
    align-items: center;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 4rem;
    /* Large and confident */
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
    font-weight: 800;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 540px;
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

.cta-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.badges {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.badge {
    background: #edf2f7;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.hero-visual {
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* VIBE CODING — Soften hero motion logo */
.hero-visual,
.hero-logo,
.motion-mark,
.rahu-shapes-container {
    opacity: 0.4 !important;
    /* Soft but visible on light background */
    filter: saturate(0.9) contrast(0.95);
    transform: translateZ(0);
    will-change: transform, opacity, filter;
}

.hero-visual img,
.hero-visual svg,
.rahu-shape {
    filter: saturate(0.95) contrast(0.98) drop-shadow(0 10px 30px rgba(212, 175, 55, 0.12));
}

/* Rahu Triple Shapes Visual */
.rahu-shapes-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rahu-shape {
    position: absolute;
    background: var(--color-primary);
    /* Default Orange */
    transition: all 0.5s ease;
}

/* Pill Shape */
.rahu-pill {
    width: 60px;
    height: 180px;
    border-radius: 30px;
    left: 40px;
    background: linear-gradient(180deg, #FF6B35 0%, #D84315 100%);
    animation: float-y 6s ease-in-out infinite;
}

/* D-Shape */
.rahu-d {
    width: 100px;
    height: 100px;
    border-radius: 0 50px 50px 0;
    top: 60px;
    right: 40px;
    background: linear-gradient(135deg, #FF6B35 0%, #D84315 100%);
    animation: float-y 8s ease-in-out infinite reverse;
}

/* Dot/Circle Shape */
.rahu-dot {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    bottom: 60px;
    right: 65px;
    background: radial-gradient(circle at 30% 30%, #FFB74D, #FF6B35);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
    animation: pulse-dot 4s ease-in-out infinite;
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Subtle background glow */
.hero-visual::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 51, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
}

/* Cards (What We Do) */
.card {
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: transform 0.2s;
    background: #fff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Product Feature Section */
.product-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.eyebrow {
    color: var(--color-accent);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.product-content h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.product-content h3 {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.feature-list {
    list-style: none;
    margin: var(--spacing-md) 0;
}

.feature-list li {
    margin-bottom: 8px;
    font-size: 1rem;
    opacity: 0.9;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-outline-light:hover {
    background: #fff;
    color: var(--color-primary);
}

.diagram-placeholder {
    width: 100%;
    height: 300px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

/* Projects */
.project-card {
    background: #fff;
    padding: var(--spacing-md);
    border-left: 4px solid var(--color-primary);
}

[dir="rtl"] .project-card {
    border-left: none;
    border-right: 4px solid var(--color-primary);
}

.sector-tag {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

/* Proof */
.logos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    opacity: 0.6;
}

.logo-placeholder {
    height: 60px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Why Rahu - Clean Text */
.feature-block h3 {
    border-top: 2px solid var(--color-accent);
    padding-top: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-main);
    transition: all 0.3s;
}

/* Responsive */
@media (max-width: 900px) {
    .mobile-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        /* Adjust based on header height */
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }

    nav ul.active {
        display: flex;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero,
    .product-feature {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 2rem auto;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-group {
        justify-content: center;
    }
}

/* VIBE CODING — Animated Client Logo Carousel (Normalized) */
.marquee-container {
    width: 100% !important;
    overflow: hidden !important;
    padding: 14px 0 0 !important;
    position: relative !important;
    direction: ltr !important;
}

.marquee-container::before,
.marquee-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #FFF5F5, transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #FFF5F5, transparent);
}

.marquee-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    gap: 0 !important;
    align-items: center !important;
    animation: rahuLogoScroll 35s linear infinite !important;
    white-space: nowrap !important;
}

.clients-title {
    font-size: clamp(1.1rem, 1.2vw + 0.8rem, 1.6rem);
    font-weight: 700;
    margin: 0 0 14px 0;
    text-align: center;
}

.clients-subtitle {
    font-size: clamp(0.95rem, 0.6vw + 0.7rem, 1.1rem);
    opacity: 0.75;
    margin: 0 0 18px 0;
    text-align: center;
}

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

.logo-box {
    width: 320px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-box img {
    /* Base normalization box */
    max-width: 240px;
    max-height: 85px;
    width: auto;
    height: auto;

    object-fit: contain;
    object-position: center;
    filter: grayscale(100%) contrast(1.2) brightness(0.9);
    opacity: 0.85;
    /* Slightly more visible */
    transition: all 400ms ease;
}

/* Targeted Visual Weight Calibration */
/* NCB is naturally bulky, we scale it down */
.logo-box img[src*="NCB"],
.logo-box img[src*="Mobily"] {
    max-height: 70px;
}

/* Elm and Health logos are often slim/small, we allow them more height */
.logo-box img[src*="Elm"],
.logo-box img[src*="Health"],
.logo-box img[src*="SDAIA"],
.logo-box img[src*="holding"],
.logo-box img[src*="logo 1-"],
.logo-box img[src*="Untitled"] {
    max-height: 95px;
}

/* Wide logos need a bit more width freedom but constrained height */
.logo-box img[src*="Justice"],
.logo-box img[src*="Real Estate"] {
    max-width: 280px;
    max-height: 75px;
}

.logo-box img:hover {
    filter: grayscale(0%) contrast(1) brightness(1);
    opacity: 1;
    transform: translateY(-3px) scale(1.05);
}

@keyframes rahuLogoScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-content {
        animation: none !important;
        transform: none !important;
    }
}

/* SAGE UI Overrides & Scale */
.hero-eyebrow,
.page-label,
.hero-kicker,
.hero-tag,
.eyebrow {
    display: none !important;
}

.hero h1,
.hero-title {
    color: var(--color-text-main) !important;
    font-size: clamp(2.6rem, 6vw + 0.5rem, 5rem) !important;
    line-height: 1.06 !important;
    font-weight: 850 !important;
    letter-spacing: -0.02em !important;
}

.hero p,
.hero-subtitle,
.hero-description {
    color: var(--color-text-muted) !important;
    font-size: clamp(1.05rem, 1.1vw + 0.75rem, 1.35rem) !important;
    line-height: 1.7 !important;
    max-width: 56ch !important;
}