/* MUSAED dark theme (v3) — loaded after ds.css + site.css.
   Direction: dark navy ground, orange primary actions, soft glows, rounded glass cards,
   product colours from the brand kit. Mix of source/inspiration/concept-01..08. */

:root {
  --color-bg: #0a1624;
  --color-surface: #10223a;
  --color-text: #e9eff6;
  --color-divider: rgba(255, 255, 255, .11);
  --color-accent: #f07a10;
  --color-accent-100: rgba(240, 122, 16, .12);
  --color-accent-200: #c9d6e4;
  --color-accent-300: #ffb36b;
  --color-accent-400: rgba(240, 122, 16, .55);
  --color-accent-500: #ff9a3d;
  --color-accent-600: #ff8a24;
  --color-accent-700: #ffa255;
  --color-accent-800: rgba(240, 122, 16, .16);
  --color-accent-900: #0f2a44;
  --color-neutral-100: rgba(255, 255, 255, .06);
  --color-neutral-500: #6f8399;
  --color-neutral-800: #c9d6e4;
  --font-heading: "Poppins", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --card: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  --card-border: rgba(255, 255, 255, .1);
  --glow: 0 20px 60px rgba(0, 0, 0, .35);
  --erp: #3fc1d1; --edu: #b98cf0; --crm: #ff9a3d; --masar: #b4c77a;
  --radius-card: 16px;
  color-scheme: dark;
}
html[lang="ar"] { --font-heading: "IBM Plex Sans Arabic", "Poppins", system-ui, sans-serif; --font-body: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }
body { background: var(--color-bg); }
::selection { background: rgba(240, 122, 16, .35); }

/* Background: faint grid + brand glows */
.grid-bg {
  background-image:
    radial-gradient(900px 500px at 85% -5%, rgba(63, 193, 209, .13), transparent 60%),
    radial-gradient(800px 500px at 0% 30%, rgba(185, 140, 240, .10), transparent 60%),
    radial-gradient(700px 400px at 100% 80%, rgba(240, 122, 16, .08), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
}

/* Blueprint frames become rounded glass cards; registration marks retire */
.blueprint > .corner { display: none; }
.blueprint { border-radius: var(--radius-card); border-color: var(--card-border); background: var(--card); }
.btn { border-radius: 10px; font-family: var(--font-heading); font-weight: 600; letter-spacing: 0; }
.btn-primary, .btn-primary.blueprint { background: var(--color-accent); border-color: var(--color-accent); color: #fff; box-shadow: 0 8px 24px rgba(240, 122, 16, .28); }
.btn-primary:hover, .btn-primary.blueprint:hover { background: #ff8a24; color: #fff; }
.btn-secondary { border-color: rgba(255, 255, 255, .22); color: var(--color-text); background: rgba(255, 255, 255, .03); }
.btn-secondary:hover { background: rgba(255, 255, 255, .08); }
.input { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); color: var(--color-text); border-radius: 10px; }
select.input option { background: var(--color-surface); }
.tag { border-radius: 999px; }
.tag-accent { background: rgba(240, 122, 16, .16); color: #ffb36b; }
.tag-outline { border-color: #ffa255; color: #ffa255; }
.tag-neutral { background: rgba(255, 255, 255, .08); color: #c9d6e4; }
a { color: #ffa255; }

/* Type: modern title case instead of condensed caps */
.display, .h-cond, .shared-grid .t, .mod-card .t, .ai-band h2, .cta-row h2 { text-transform: none; letter-spacing: -.02em; }
.display { font-weight: 700; line-height: 1.08; }
.display-xl { font-size: clamp(42px, 5.6vw, 76px); }
.display-l, .display-m { font-size: clamp(38px, 5vw, 64px); }
.display .acc { background: linear-gradient(90deg, #ffa255, #f07a10 45%, #ff5a5f); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="ar"] .display { line-height: 1.3; }
.code-big, .prod-row .code-huge, .arch-cell .code, .tabs a, .links-list .c, .choice-code, .chat-head .t, .arch-core b, .agenda b, .milestone b { font-family: "Poppins", sans-serif; font-weight: 700; letter-spacing: 0; }
.kicker, .small-caps, .prod-kind, .arch-cell .kind, .step-label { letter-spacing: .1em; }
.lead { color: #b8c6d6; }

/* Header */
.site-header { background: rgba(10, 22, 36, .78); border-bottom-color: rgba(255, 255, 255, .08); }
.main-nav a { color: #c9d6e4; }
.main-nav a[aria-current="page"], .main-nav a:hover { color: #fff; border-bottom-color: var(--color-accent); }
.lang-link { color: #c9d6e4; }

/* Home hero: full-bleed image with the text and the architecture card on top */
.hero-banner { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.hero-banner::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hero, url("/img/hero.jpg")) center / cover no-repeat; }
.hero-banner::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 22, 36, .96) 0%, rgba(10, 22, 36, .78) 45%, rgba(10, 22, 36, .45) 100%),
              linear-gradient(0deg, var(--color-bg) 0%, transparent 35%); }
[dir="rtl"] .hero-banner::after { background: linear-gradient(270deg, rgba(10, 22, 36, .96) 0%, rgba(10, 22, 36, .78) 45%, rgba(10, 22, 36, .45) 100%), linear-gradient(0deg, var(--color-bg) 0%, transparent 35%); }
.hero { padding-top: 96px; padding-bottom: 96px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); font-size: 13px; color: #c9d6e4; margin-bottom: 22px; }
.hero-badge i { width: 8px; height: 8px; border-radius: 50%; background: #3fc1d1; box-shadow: 0 0 10px #3fc1d1; }
.hero-tags span { display: inline-flex; align-items: center; gap: 8px; }
.hero-tags span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }
.arch-card { backdrop-filter: blur(10px); background: rgba(10, 22, 36, .6) !important; box-shadow: var(--glow); }
.arch::before { border-top-color: rgba(255, 255, 255, .15); }
.arch::after { border-left-color: rgba(255, 255, 255, .15); }
.arch-cell { background: rgba(255, 255, 255, .03); border-radius: 12px; }
.arch-cell.on { background: rgba(240, 122, 16, .12); border-color: rgba(240, 122, 16, .6); }
.arch-cell[data-hov="erp"] svg { stroke: var(--erp); } .arch-cell[data-hov="edu"] svg { stroke: var(--edu); }
.arch-cell[data-hov="crm"] svg { stroke: var(--crm); } .arch-cell[data-hov="masar"] svg { stroke: var(--masar); }
.arch-core { border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ff9a3d, #f07a10 55%, #b4520a); box-shadow: 0 0 40px rgba(240, 122, 16, .55); color: #fff; }

/* Product cards with images */
.prod-card { padding: 0; overflow: hidden; gap: 0; }
.prod-card:hover { background: var(--card); transform: translateY(-4px); box-shadow: var(--glow); border-color: rgba(255, 255, 255, .2); }
.prod-card { transition: transform .25s, box-shadow .25s, border-color .25s; }
.prod-card .thumb { aspect-ratio: 4 / 3; background-size: cover; background-position: center; border-bottom: 1px solid var(--card-border); }
.prod-card .body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.prod-card .more { color: #fff; }
.prod-card .more-btn { margin-top: auto; align-self: flex-start; }
.pbar { border-radius: 2px; }

/* Shared features */
.shared-grid { gap: 16px; }
.shared-grid > div { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-card); padding: 22px; }
.shared-grid .n { color: #ffa255; }

/* AI band */
.ai-band { border-radius: 24px; background:
  radial-gradient(600px 300px at 90% 0%, rgba(240, 122, 16, .25), transparent 60%),
  radial-gradient(500px 300px at 0% 100%, rgba(63, 193, 209, .18), transparent 60%), #0f2a44;
  border: 1px solid rgba(255, 255, 255, .08); }
.ai-band .kicker { color: #ffb36b; }
.ai-band p { color: #c9d6e4; }
.prompt-btn { border-radius: 12px; border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); }
.prompt-btn:hover { background: rgba(240, 122, 16, .14); border-color: rgba(240, 122, 16, .6); }

/* Product detail hero image */
.product-hero { position: relative; isolation: isolate; }
.product-figure { margin: 0 0 18px; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--card-border); aspect-ratio: 16 / 9; background-size: cover; background-position: center; box-shadow: var(--glow); }
.tabs { border-radius: 12px; overflow: hidden; border-color: var(--card-border); }
.tabs a { color: #c9d6e4; }
.tabs a[aria-current="page"] { color: #fff; }
.kpis, .course, .deal, .table th, .gantt-h { border-color: var(--card-border); }
.kpis { border-radius: 12px; overflow: hidden; }
.course, .deal { border-radius: 10px; }
.course .bar { background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden; }
.gantt-row .bar { border-radius: 4px; background: rgba(240, 122, 16, .18); }
.gantt-row.done .bar { background: var(--color-accent); }
.mod-card .n { color: #ffa255; }
.check-list svg { stroke: #3fc1d1; }

/* Products page rows */
.prod-row { padding: 0; overflow: hidden; grid-template-columns: minmax(0, 280px) repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.prod-row .row-img { align-self: stretch; min-height: 220px; background-size: cover; background-position: center; }
.prod-row > div:not(.row-img) { padding-block: 26px; }
.prod-row > div:last-child { padding-inline-end: 26px; }
@media (max-width: 760px) { .prod-row { grid-template-columns: 1fr; } .prod-row > div:not(.row-img) { padding-inline: 22px; } }
.chooser a:hover, .links-list a:hover, .gantt-row:hover, .ask-card:hover { background: rgba(255, 255, 255, .04); }

/* Choices, forms */
.choice { border-radius: 10px; border-color: rgba(255, 255, 255, .16); }
.choice.on { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.seg-row { border-radius: 12px; overflow: hidden; border-color: rgba(255, 255, 255, .16); }
.seg-row .choice { border-radius: 0; }
.error-box { border-radius: 10px; border-color: rgba(255, 90, 95, .6); background: rgba(255, 90, 95, .1); color: #ffb3b5; }
.ok-badge { border-radius: 50%; }
.about-figure { border-radius: var(--radius-card); background: radial-gradient(circle at 50% 40%, #16365a, #0f2a44 70%); }

/* Footer */
.site-footer { background: #07111c; border-top-color: rgba(255, 255, 255, .06); }
.foot-col .small-caps { color: #ffb36b; }
.foot-col a, .foot-col button { color: #c9d6e4; }

/* Chat */
.chat-panel { background: #0d1d30 !important; border-radius: 18px; }
.chat-launch { border-radius: 999px; }
.msg { border-radius: 14px; }
.msg.user { background: rgba(240, 122, 16, .18); color: #ffe2c7; }
.msg.ai { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); }
.suggest button { border-radius: 10px; color: #ffb36b; border-color: rgba(255, 255, 255, .14); }
.typing { border-radius: 14px; }

/* fixes */
.ai-band { color: #fff; }
.ai-band h2 { color: #fff; }
.prompt-btn { color: #e9eff6; }
.hero-banner::after { background: linear-gradient(90deg, rgba(10, 22, 36, .95) 0%, rgba(10, 22, 36, .7) 45%, rgba(10, 22, 36, .25) 100%), linear-gradient(0deg, var(--color-bg) 0%, transparent 30%); }
[dir="rtl"] .hero-banner::after { background: linear-gradient(270deg, rgba(10, 22, 36, .95) 0%, rgba(10, 22, 36, .7) 45%, rgba(10, 22, 36, .25) 100%), linear-gradient(0deg, var(--color-bg) 0%, transparent 30%); }

/* v3.1 — Grok images (portrait): hero image on the inline-end side, fading into the page */
.hero-banner::before { inset: 0 0 0 auto; width: 58%; background-position: center 40%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); }
[dir="rtl"] .hero-banner::before { inset: 0 auto 0 0; -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 45%); mask-image: linear-gradient(270deg, transparent 0%, #000 45%); }
.hero-banner::after { background: linear-gradient(90deg, rgba(10, 22, 36, .92) 0%, rgba(10, 22, 36, .55) 50%, rgba(10, 22, 36, .2) 100%), linear-gradient(0deg, var(--color-bg) 0%, transparent 30%); }
[dir="rtl"] .hero-banner::after { background: linear-gradient(270deg, rgba(10, 22, 36, .92) 0%, rgba(10, 22, 36, .55) 50%, rgba(10, 22, 36, .2) 100%), linear-gradient(0deg, var(--color-bg) 0%, transparent 30%); }
@media (max-width: 900px) { .hero-banner::before, [dir="rtl"] .hero-banner::before { width: 100%; -webkit-mask-image: none; mask-image: none; opacity: .45; } }
/* frame each product image on its subject */
[style*="/img/crm.jpg"] { background-position: center 42% !important; }
[style*="/img/masar.jpg"] { background-position: center 55% !important; }
[style*="/img/erp.jpg"] { background-position: center center !important; }
.product-figure { aspect-ratio: 4 / 3; }
[style*="/img/edu.jpg"] { background-position: center 45% !important; }

/* v3.2 — homepage hero video (Grok loop, dark side behind the headline) */
.hero-banner.has-video::before { display: none; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; background: #05090f; }
[dir="rtl"] .hero-video { transform: scaleX(-1); }
.hero-banner.has-video::after { background: linear-gradient(90deg, rgba(10, 22, 36, .85) 0%, rgba(10, 22, 36, .35) 50%, rgba(10, 22, 36, .1) 100%), linear-gradient(0deg, var(--color-bg) 0%, transparent 28%); }
[dir="rtl"] .hero-banner.has-video::after { background: linear-gradient(270deg, rgba(10, 22, 36, .85) 0%, rgba(10, 22, 36, .35) 50%, rgba(10, 22, 36, .1) 100%), linear-gradient(0deg, var(--color-bg) 0%, transparent 28%); }
@media (max-width: 900px) { .hero-banner.has-video::after { background: rgba(10, 22, 36, .7); } }
.hero-video { transition: opacity .9s linear; }
.hero-video.standby { opacity: 0; }

/* v3.3 — brand film player */
.btn-film { gap: 10px; }
.btn-film .play-dot { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--color-accent); display: inline-grid; place-items: center; font-size: 11px; padding-inline-start: 2px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .12); }
.film { position: fixed; inset: 0; z-index: 100; background: rgba(3, 8, 14, .92); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; }
.film[hidden] { display: none; }
.film-stage { position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .1); }
.film-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s linear; }
.film-v.standby { opacity: 0; }
.film-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, 0) 45%); pointer-events: none; }
.film-title { position: absolute; inset-inline: 6%; bottom: 13%; color: #fff; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; pointer-events: none; }
.film-title.show { opacity: 1; transform: none; }
.film-k { display: block; font-family: var(--font-heading); font-weight: 700; font-size: clamp(13px, 1.6vw, 18px); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.film-line { margin: 0; font-family: var(--font-heading); font-weight: 600; font-size: clamp(18px, 3vw, 34px); line-height: 1.3; max-width: 26ch; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.film-end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px;
  background: radial-gradient(600px 300px at 50% 40%, rgba(240, 122, 16, .18), transparent 70%), #0a1624; color: #fff; animation: filmIn .7s ease; }
.film-end[hidden] { display: none; }
.film-end img { height: clamp(36px, 6vw, 64px); width: auto; }
.film-end h2 { margin: 6px 0 0; font-family: var(--font-heading); font-size: clamp(20px, 3.2vw, 36px); }
.film-end p { margin: 0; color: #9fb7c9; }
.film-end-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
@keyframes filmIn { from { opacity: 0; } to { opacity: 1; } }
.film-bar { position: absolute; inset-inline: 6%; bottom: 6%; display: flex; gap: 6px; }
.film-bar span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); cursor: pointer; overflow: hidden; }
.film-bar span i { display: block; height: 100%; width: 0; background: #fff; }
.film-bar span.done i { width: 100% !important; }
.film-bar span:not(.on):not(.done) i { width: 0 !important; }
.film-ctrl { position: absolute; inset-inline-end: 6%; bottom: calc(6% + 14px); display: flex; gap: 8px; }
.film-btn, .film-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; font-size: 14px; display: grid; place-items: center; }
.film-btn:hover, .film-close:hover { background: rgba(240, 122, 16, .8); border-color: transparent; }
.film-close { position: absolute; top: 14px; inset-inline-end: 14px; }
@media (max-width: 640px) { .film { padding: 0; } .film-stage { border-radius: 0; } .film-ctrl { bottom: calc(6% + 10px); } .film-title { bottom: 18%; } }
