/* روحة (Rooha) — Glassmorphism & neon landing theme */

:root {
    --rooha-cyan: #00F2FE;
    --rooha-teal: #00C9A7;
    --rooha-teal-deep: #0d9488;
    --rooha-dark: #0A1128;
    --rooha-slate: #0F172A;
    --rooha-glass: rgba(255, 255, 255, 0.06);
    --rooha-glass-border: rgba(0, 242, 254, 0.18);
    --rooha-heading: #f8fafc;
    --rooha-text: #e2e8f0;
    --rooha-muted: #cbd5e1;
    --rooha-font: 'Tajawal', 'Inter', system-ui, sans-serif;
}

html.light {
    --rooha-dark: #f4fbfb;
    --rooha-slate: #ffffff;
    --rooha-glass: rgba(255, 255, 255, 0.88);
    --rooha-glass-border: rgba(13, 148, 136, 0.22);
    --rooha-heading: #0f172a;
    --rooha-text: #334155;
    --rooha-muted: #475569;
}

html {
    font-size: 16px;
}

body {
    background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 242, 254, 0.12), transparent 50%),
        radial-gradient(ellipse 80% 50% at 100% 50%, rgba(0, 201, 167, 0.08), transparent 45%),
        var(--rooha-dark);
    color: var(--rooha-text);
    font-family: var(--rooha-font);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html.light body {
    background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(0, 201, 167, 0.07), transparent 55%), #f8fafc;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--rooha-heading);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0;
}

p, li, label, input, textarea, button, a {
    font-family: inherit;
}

/* High-contrast text overrides (Tailwind utility fixes) */
.text-slate-200,
.text-slate-300 {
    color: var(--rooha-text) !important;
}

.text-slate-400,
.text-slate-500 {
    color: var(--rooha-muted) !important;
}

html.light .text-white {
    color: var(--rooha-heading) !important;
}

html:not(.light) h1,
html:not(.light) h2,
html:not(.light) h3,
html:not(.light) .font-extrabold {
    color: var(--rooha-heading);
}

html.light .neon-text {
    background: linear-gradient(135deg, #0d9488, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html:not(.light) .neon-text {
    background: linear-gradient(135deg, var(--rooha-cyan), var(--rooha-teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.prose,
.prose-invert {
    color: var(--rooha-text) !important;
}

.prose strong,
.prose b {
    color: var(--rooha-heading);
    font-weight: 700;
}

.glass-panel {
    background: var(--rooha-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--rooha-glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.light .glass-panel {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.neon-text {
    font-weight: 800;
}

.neon-glow {
    box-shadow: 0 0 40px rgba(0, 242, 254, 0.35), 0 0 80px rgba(0, 201, 167, 0.15);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    animation: float-orb 8s ease-in-out infinite;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.05); }
}

.phone-float {
    animation: phone-float 6s ease-in-out infinite;
}

@keyframes phone-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-14px) rotate(2deg); }
}

/* ── How it works — centered showcase ── */
.how-work-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 100%;
    margin-inline: auto;
}

.how-work-card {
    flex: 0 1 260px;
    max-width: 280px;
    width: 100%;
    opacity: 0;
    transform: translateY(36px) scale(0.96);
}

.reveal-section.is-visible .how-work-card {
    animation: how-work-enter 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--how-work-delay, 0s) + 0.15s);
}

.how-work-card-inner {
    height: 100%;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.how-work-card:hover .how-work-card-inner {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 242, 254, 0.15);
    border-color: rgba(0, 242, 254, 0.35);
}

.how-work-phone {
    animation: how-work-float 5.5s ease-in-out infinite;
    animation-delay: var(--how-work-float-delay, 0s);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

@keyframes how-work-enter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes how-work-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.how-work-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rooha-dark);
    background: linear-gradient(135deg, var(--rooha-cyan), var(--rooha-teal));
}

/* ── Partners — full-width infinite marquee ── */
.partner-marquee-shell {
    position: relative;
    width: 100%;
    max-width: 100vw;
    margin-inline: auto;
}

.partner-marquee-viewport {
    overflow: hidden;
    width: 100%;
}

.partner-marquee-track {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: max-content;
    min-width: 200%;
    will-change: transform;
    animation: partner-marquee-scroll var(--partner-marquee-duration, 36s) linear infinite;
    animation-play-state: paused;
}

.reveal-section.is-visible .partner-marquee-track {
    animation-play-state: running;
}

.partner-marquee-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding-inline: 0.625rem;
    flex-shrink: 0;
}

.partner-logo-card {
    flex-shrink: 0;
    width: 9rem;
    height: 5.75rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.partner-logo-card:hover {
    transform: translateY(-4px) scale(1.04);
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 12px 32px rgba(0, 242, 254, 0.12);
}

.partner-logo-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    opacity: 0.88;
    transition: opacity 0.3s ease;
    user-select: none;
    pointer-events: none;
}

.partner-logo-card:hover .partner-logo-img {
    opacity: 1;
}

.partner-marquee-edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(2rem, 8vw, 5rem);
    z-index: 2;
    pointer-events: none;
}

.partner-marquee-edge--start {
    left: 0;
    background: linear-gradient(to right, var(--rooha-dark) 15%, transparent);
}

.partner-marquee-edge--end {
    right: 0;
    background: linear-gradient(to left, var(--rooha-dark) 15%, transparent);
}

.partner-marquee-shell:hover .partner-marquee-track {
    animation-play-state: paused;
}

@keyframes partner-marquee-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-50%, 0, 0);
    }
}

/* ── Scroll reveal (sections) ── */
.reveal-section {
    opacity: 0;
    transform: translateY(56px);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-section .reveal-stagger > * {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-section.is-visible .reveal-stagger > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-section.is-visible .reveal-stagger > *:nth-child(1) { transition-delay: 0.08s; }
.reveal-section.is-visible .reveal-stagger > *:nth-child(2) { transition-delay: 0.16s; }
.reveal-section.is-visible .reveal-stagger > *:nth-child(3) { transition-delay: 0.24s; }
.reveal-section.is-visible .reveal-stagger > *:nth-child(4) { transition-delay: 0.32s; }
.reveal-section.is-visible .reveal-stagger > *:nth-child(5) { transition-delay: 0.40s; }
.reveal-section.is-visible .reveal-stagger > *:nth-child(6) { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
    .reveal-section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reveal-section .reveal-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .how-work-card {
        opacity: 1;
        transform: none;
        animation: none !important;
    }

    .how-work-phone {
        animation: none;
    }

    .partner-marquee-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        min-width: 0;
        gap: 1rem;
        padding: 0 1rem;
    }

    .partner-marquee-group[aria-hidden="true"] {
        display: none;
    }

    .partner-marquee-group {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 639px) {
    .how-work-card {
        flex: 0 1 min(100%, 280px);
    }

    .partner-logo-card {
        width: 7.5rem;
        height: 5rem;
    }
}

.service-cube {
    transform-style: preserve-3d;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-cube:hover {
    transform: translateY(-8px) rotateX(4deg);
    box-shadow: 0 20px 50px rgba(0, 242, 254, 0.2);
}

.nav-scrolled {
    background: rgba(10, 17, 40, 0.85) !important;
    border-bottom-color: rgba(0, 242, 254, 0.2) !important;
}

html.light .nav-scrolled {
    background: rgba(255, 255, 255, 0.9) !important;
}

.loader-rooha {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rooha-dark);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader-rooha.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.section-anchor {
    scroll-margin-top: 5.5rem;
}

[x-cloak] {
    display: none !important;
}

html.light footer h6.text-white,
html.light article h3.text-white {
    color: var(--rooha-heading);
}

.scrollbar-thin::-webkit-scrollbar {
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.35);
    border-radius: 999px;
}
