/* Musayir page CSS: brand tokens from the logo, RTL fixes, and what sits inside the visuals.
   Logo colours: night #0B1561, royal #2C5AC2, violet corner #5F2ECE, electric blue #006CF6,
   cyan #00C3E0, teal #16CE9C, green #7BF77E. */

@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-arabic-wght-normal.woff2") format("woff2"); font-weight: 160 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-latin-wght-normal.woff2") format("woff2"); font-weight: 160 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --m-night: #0b1561; --m-deep: #070d3f; --m-royal: #2c5ac2; --m-violet: #5f2ece;
  --m-blue: #006cf6; --m-cyan: #00c3e0; --m-teal: #16ce9c; --m-green: #7bf77e;
  --m-line: linear-gradient(90deg, var(--m-blue), var(--m-cyan) 45%, var(--m-teal) 75%, var(--m-green));
}
html[lang="ar"] { --display-tracking: 0; --display-tracking-xl: 0; }
html[lang="ar"] body { line-height: 1.75; }
html[lang="ar"] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] h1 { line-height: 1.25; }

/* ---------- RTL: the kit is written left to right ---------- */
html[dir="rtl"] .m-arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .m-arrow, html[dir="rtl"] .btn:focus-visible .m-arrow { transform: scaleX(-1) translateX(2px); }
html[dir="rtl"] .nav--centre .nav__logo { justify-self: start; }
html[dir="rtl"] .nav--centre .nav__actions { justify-self: end; }

/* ---------- Logo in the bar and the footer ---------- */
.nav__logo { gap: 10px; font-weight: 600; }
.nav__logo img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.lang-switch { font-family: "Readex Pro", system-ui, sans-serif; }

/* ---------- Hero: the logo's ground ---------- */
.hero.m-night {
  --bg: var(--m-deep); --surface: #121a5c; --ink: #f2f4ff; --muted: #a8b0dc; --line: rgba(242, 244, 255, .14);
  --action: #0b5fe0; --action-ink: #ffffff; --accent: var(--m-green);
  background:
    radial-gradient(60% 70% at 92% 0%, rgba(44, 90, 194, .55), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(95, 46, 206, .45), transparent 70%),
    linear-gradient(180deg, var(--m-night), var(--m-deep));
  color: var(--ink);
}
html[dir="rtl"] .hero.m-night { background:
    radial-gradient(60% 70% at 8% 0%, rgba(44, 90, 194, .55), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(95, 46, 206, .45), transparent 70%),
    linear-gradient(180deg, var(--m-night), var(--m-deep)); }
.hero.m-night .btn--secondary { --btn-line: rgba(242, 244, 255, .35); color: var(--ink); }
.hero.m-night .hero-notice { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.hero.m-night .hero-notice i { width: 22px; height: 6px; border-radius: 3px; background: var(--m-line); display: inline-block; }
.hero.m-night h1 .grad { background: linear-gradient(90deg, var(--m-cyan), var(--m-green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[dir="rtl"] .hero.m-night h1 .grad { background: linear-gradient(270deg, var(--m-cyan), var(--m-green)); -webkit-background-clip: text; background-clip: text; }
.header-on-night .nav { --bg: var(--m-night); }

/* ---------- The app window in the hero (live HTML of the CRM's incoming-call view) ---------- */
.callwin { position: relative; height: 100%; min-height: 0; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, rgba(44, 90, 194, .35), rgba(11, 21, 97, .2) 55%, rgba(95, 46, 206, .3)); border: 1px solid rgba(242, 244, 255, .12); }
.callwin__rails { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.callwin__app { position: absolute; inset: 48px 48px auto 48px; background: #fbfcff; color: #0b1033; border-radius: 16px; box-shadow: 0 30px 80px rgba(3, 6, 40, .45); overflow: hidden; font-size: 14px; }
.callwin__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #e6e9f5; font-size: 13px; color: #5a6185; }
.callwin__bar b { color: #0b1033; font-weight: 600; }
.callwin__bar .dots { display: flex; gap: 6px; margin-inline-end: 8px; } .callwin__bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: #dfe3f1; }
.callwin__bar .live { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; color: #0a7a52; font-weight: 500; }
.callwin__bar .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--m-teal); box-shadow: 0 0 0 4px rgba(22, 206, 156, .18); animation: m-pulse 1.6s ease-in-out infinite; }
@keyframes m-pulse { 50% { box-shadow: 0 0 0 7px rgba(22, 206, 156, .05); } }
.callwin__body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; }
.callwin__caller { padding: 20px; display: grid; gap: 14px; align-content: start; border-inline-end: 1px solid #e6e9f5; }
.who { display: flex; align-items: center; gap: 12px; }
.who__av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: #1a2c8c; flex: none; }
.who__name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.who__num { color: #5a6185; font-size: 13px; direction: ltr; unicode-bidi: isolate; }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #0a6a48; }
.tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--m-teal); }
.kv { display: grid; gap: 8px; margin: 0; font-size: 13px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #eef0f8; padding-top: 8px; }
.kv dt { color: #5a6185; } .kv dd { margin: 0; font-weight: 500; text-align: end; }
.callwin__route { padding: 20px; display: grid; gap: 10px; align-content: start; background: #f5f6fb; }
.callwin__route .t { font-size: 12.5px; color: #5a6185; font-weight: 500; }
.agent { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #e6e9f5; font-size: 13.5px; }
.agent i { width: 28px; height: 28px; border-radius: 50%; background: #e3e7f6; flex: none; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; color: #3b4370; }
.agent span { display: grid; line-height: 1.35; } .agent small { color: #5a6185; font-size: 12px; }
.agent em { white-space: nowrap; margin-inline-start: auto; font-style: normal; font-size: 12px; color: #5a6185; }
.agent.is-on { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--m-line) border-box; border: 1.5px solid transparent; }
.agent.is-on i { background: #1a2c8c; color: #fff; }
.agent.is-on em { color: #0a7a52; font-weight: 600; }
.agent.is-busy em { color: #b4541d; }
.callwin__card { position: absolute; inset-inline-start: 32px; bottom: 32px; width: 300px; background: #0b1561; color: #f2f4ff; border: 1px solid rgba(242, 244, 255, .16); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; font-size: 13.5px; backdrop-filter: blur(6px); }
.callwin__card .row { display: flex; align-items: center; gap: 10px; opacity: 1; }
.callwin__card .row b { font-weight: 500; }
.callwin__card .row s { text-decoration: none; margin-inline-start: auto; color: #a8b0dc; font-size: 12px; direction: ltr; }
.callwin__card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m-cyan); flex: none; }
.callwin__card .row:nth-child(2) .dot { background: #f0a35b; } .callwin__card .row:nth-child(3) .dot { background: var(--m-green); }
@media (prefers-reduced-motion: no-preference) {
  .callwin__card[data-loop] .row { animation: m-row 6s infinite both; }
  .callwin__card[data-loop] .row:nth-child(2) { animation-delay: .7s; }
  .callwin__card[data-loop] .row:nth-child(3) { animation-delay: 1.4s; }
  .callwin__card[data-loop]:hover .row { animation-play-state: paused; }
}
@keyframes m-row { 0%, 70% { opacity: 1; transform: none; } 78%, 84% { opacity: 0; transform: translateY(4px); } 92%, 100% { opacity: 1; transform: none; } }
.rail-flow { stroke-dasharray: 6 18; animation: m-flow 1.6s linear infinite; }
@keyframes m-flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .rail-flow { animation: none; } }
@media (max-width: 1023px) {
  .callwin__app { inset: 16px 16px auto 16px; }
  .callwin__card { display: none; }
}
@media (max-width: 639px) {
  .callwin__body { grid-template-columns: 1fr; }
  .callwin__route { display: none; }
  .callwin__caller { border: 0; padding: 16px; gap: 10px; }
  .kv div:nth-child(n+3) { display: none; }
}

/* ---------- How it works: four steps on the twin rails ---------- */
.rails { position: relative; margin-top: var(--s-8); }
.rails__svg { display: block; width: 100%; height: 120px; }
.rails__steps { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter, 24px); }
.rails__steps li { display: grid; gap: var(--s-3); align-content: start; }
.rails__steps .n { font-size: var(--t-label); font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.rails__steps .n::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--m-cyan); background: var(--bg); }
.rails__steps li:nth-child(3) .n::before { border-color: var(--m-teal); } .rails__steps li:nth-child(4) .n::before { border-color: var(--m-green); background: var(--m-green); }
.rails__steps h3 { margin: 0; font-size: var(--t-card); }
.rails__steps p { margin: 0; }
@media (max-width: 1023px) { .rails__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-7); } .rails__svg { height: 80px; } }
@media (max-width: 639px) { .rails__steps { grid-template-columns: 1fr; row-gap: var(--s-6); } .rails__svg { height: 40px; } .rails { margin-top: var(--s-6); } }

/* ---------- Feature tiles: small UI in each panel ---------- */
#services .card--open > .panel { padding: 16px; --p-h: 300px; background: var(--surface); display: grid; place-items: center; padding: 24px; overflow: hidden; }
@media (max-width: 639px) { #services .card--open > .panel { --p-h: 140px; } }
.mini { width: min(100%, 300px); display: grid; gap: 8px; font-size: 13px; }
.mini .chip-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e3e7f4; border-radius: 12px; padding: 9px 12px; }
.mini .chip-row b { font-weight: 500; } .mini .chip-row s { text-decoration: none; margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.mini .av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--m-blue), var(--m-teal)); flex: none; }
.mini .av--g { background: #dfe3f1; }
.mini .ok { color: #0a7a52 !important; font-weight: 600; }
.mini .num { direction: ltr; unicode-bidi: isolate; font-size: 22px; font-weight: 600; letter-spacing: .02em; text-align: center; padding: 14px; background: #fff; border-radius: 12px; border: 1px solid #e3e7f4; }
.mini .wave { display: flex; align-items: center; justify-content: center; gap: 5px; height: 64px; background: #fff; border: 1px solid #e3e7f4; border-radius: 12px; }
.mini .wave i { width: 5px; border-radius: 3px; background: var(--m-line); height: calc(var(--h) * 1px); }
@media (prefers-reduced-motion: no-preference) { .card:hover .mini .wave i { animation: m-wave 1s ease-in-out infinite alternate; animation-delay: calc(var(--h) * -20ms); } }
@keyframes m-wave { to { transform: scaleY(.45); } }
.mini .bars { display: flex; align-items: flex-end; gap: 8px; height: 90px; padding: 12px; background: #fff; border: 1px solid #e3e7f4; border-radius: 12px; }
.mini .bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: #cfd6f0; height: calc(var(--h) * 1%); }
.mini .bars i.hi { background: linear-gradient(0deg, var(--m-blue), var(--m-teal)); }
.mini .legend { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.mini .line-route { height: 4px; border-radius: 2px; background: var(--m-line); }
html[dir="rtl"] .mini .line-route { background: linear-gradient(270deg, var(--m-blue), var(--m-cyan) 45%, var(--m-teal) 75%, var(--m-green)); }

/* ---------- Why Musayir: the dark section and its route figure ---------- */
#about.ground-inverse { --bg: var(--m-night); --surface: #141d6a; --ink: #f2f4ff; --muted: #a8b0dc; --line: rgba(242, 244, 255, .14); --action: #0b5fe0; --action-ink: #ffffff; --accent: var(--m-green); }
.why-list { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter, 24px); }
.why-list li { display: grid; gap: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.why-list strong { font-weight: 500; font-size: var(--t-card); }
.why-list span { color: var(--muted); }
@media (max-width: 639px) { .why-list { grid-template-columns: 1fr; } }
.route-fig { position: relative; border-radius: var(--r-lg); background: #141d6a; border: 1px solid var(--line); overflow: hidden; height: min(520px, 100%); min-height: 360px; }
.route-fig svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-fig text { font-family: "Readex Pro", system-ui, sans-serif; fill: #f2f4ff; font-size: 14px; }
.route-fig .lbl-muted { fill: #a8b0dc; font-size: 13px; }

/* ---------- Contact form in the close ---------- */
.close-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter, 24px); align-items: start; }
.close-grid > .section-head { grid-column: span 5; }
.close-grid > form { grid-column: 7 / span 6; }
.close-list { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.close-list li { display: flex; gap: 10px; align-items: baseline; }
.close-list li::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--m-line); flex: none; transform: translateY(-3px); }
.mform { display: grid; gap: var(--s-4); }
.mform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.mform label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.mform label em { font-style: normal; color: var(--muted); font-weight: 400; }
.mform :is(input, select, textarea) { font: inherit; font-size: 16px; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong, rgba(11, 16, 51, .22)); background: #fff; color: var(--ink); width: 100%; }
.mform textarea { min-height: 112px; resize: vertical; }
.mform [aria-invalid="true"] { border-color: #c4342d; }
.mform .field__error { color: #b3261e; font-size: 14px; min-height: 0; }
.mform .field__error:empty { display: none; }
.form__status { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 1023px) { .close-grid > .section-head, .close-grid > form { grid-column: 1 / -1; } }
@media (max-width: 639px) { .mform .row2 { grid-template-columns: 1fr; } .mform .btn { width: 100%; } }

.footer__lede { max-width: 36ch; }
.footer .nav__logo img { width: 36px; height: 36px; }

/* Arabic headings: a calmer h2, the line under it as the lead */
html[lang="ar"] { --t-h2: clamp(30px, 1.6vw + 22px, 46px); }
.section-head > p { max-width: 62ch; color: var(--ink); font-size: var(--t-lead); margin-top: var(--s-4); }
.mform label > span:first-child { display: block; }
.site-footer { padding-block: var(--s-9) var(--s-7); border-top: 1px solid var(--line); }
.site-footer .closing__links { margin: 0; }
.footer__col h3 { font-size: var(--t-small); color: var(--muted); font-weight: 500; margin: 0 0 var(--s-3); }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer__legal { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--muted); }

html[dir="rtl"] .link::after { content: "\2190"; }
html[dir="rtl"] .link:hover::after, html[dir="rtl"] .link:focus-visible::after { transform: translateX(-3px) !important; }
html[dir="rtl"] .link { background-position: right bottom, left bottom; }
.site-footer .footer__lede { font-size: var(--t-body); font-weight: 400; color: var(--muted); line-height: 1.7; }
#services .rows-gap { margin-top: var(--s-7); }
@media (max-width: 639px) { #services .rows-gap { margin-top: var(--s-6); } }
.route-fig { height: 600px; min-height: 0; }
@media (max-width: 1023px) { .route-fig { height: 420px; } }
#about .grid--top > .span-5 { align-self: stretch; }

.close-mark { width: 72px; height: 72px; border-radius: 18px; display: block; margin-bottom: var(--s-5); }
footer.closing .closing__links { margin-top: var(--s-8); }
footer.closing .closing__links .grid { align-items: start; }

footer.closing .closing__links { margin-top: 0; }
footer.closing > .wrap { display: grid; grid-template-rows: 1fr auto; row-gap: var(--s-7); }
.mform { gap: var(--s-3); }
.mform textarea { min-height: 80px; }
.mform .btn-line { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
footer.closing .footer__legal { margin-top: var(--s-5); }

.foot-row { display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.foot-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.foot-links a { font-size: var(--t-small); color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.foot-legal { margin-inline-start: auto; font-size: var(--t-small); color: var(--muted); }
@media (max-width: 639px) { .foot-row { gap: var(--s-3); } .foot-legal { margin-inline-start: 0; width: 100%; } }
html[dir="ltr"] .rails__svg { transform: scaleX(-1); }
html[lang="en"] h1 { line-height: 1.05; }
html[dir="ltr"] .callwin__card { inset-inline-start: auto; inset-inline-end: 32px; }



#services .mini { transform: scale(1.25); }
@media (max-width: 1023px) { #services .mini { transform: none; } }
.callwin .agent { box-shadow: none; }

@media (max-width: 639px) { #services > .wrap > .grid .card--open > .panel { display: none; } #services .card--open > .panel { --p-h: 120px; } }
#services .mini .num { padding: 10px; font-size: 20px; }
@media (max-width: 639px) { #services .card--open > .panel { --p-h: 156px; } }

/* hero call window: roomier (Marwan: "too compact") */
@media (min-width: 1024px) {
  .callwin__app { inset: 32px 32px auto 32px; font-size: 15px; border-radius: 18px; }
  .callwin__bar { padding: 16px 22px; font-size: 14px; }
  .callwin__body { grid-template-columns: 1.3fr 1fr; }
  .kv dt, .who__name { white-space: nowrap; }
  .callwin__caller { padding: 28px 26px; gap: 20px; }
  .who { gap: 14px; }
  .who__av { width: 52px; height: 52px; font-size: 18px; }
  .who__name { font-size: 18px; }
  .who__num { font-size: 14px; }
  .tag { font-size: 14px; }
  .kv { gap: 12px; font-size: 14.5px; }
  .kv div { padding-top: 12px; }
  .callwin__route { padding: 28px 22px; gap: 14px; }
  .callwin__route .t { font-size: 13.5px; }
  .agent { padding: 14px 16px; gap: 12px; font-size: 15px; border-radius: 14px; }
  .agent i { width: 34px; height: 34px; font-size: 13px; }
  .agent small { font-size: 12.5px; white-space: nowrap; }
  .agent em { font-size: 13px; }
}

/* ---------- How it works: call-routing tree ---------- */
.tree { position: relative; width: 100%; height: 360px; }
.tree__svg { position: absolute; inset: 0; overflow: visible; }
.tree__base path { stroke-width: 6; opacity: .22; transition: opacity .5s ease; }
.tree__base path.is-dim { opacity: .1; }
.tree__lit path { stroke-width: 6; transition: stroke-dashoffset .5s ease, opacity .5s ease; }
.tree__dot { fill: #fff; stroke: var(--m-cyan); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(0, 195, 224, .7)); }
.tree.is-fade .tree__lit path, .tree.is-fade .tree__dot { opacity: 0; }
.tree__node { position: absolute; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e6e9f5; border-radius: 16px; padding: 12px 16px; font-size: 15px; font-weight: 500; white-space: nowrap; box-shadow: 0 10px 30px rgba(11, 21, 97, .06); transition: border-color .4s ease, box-shadow .4s ease, transform .4s ease; }
.tree__node span { display: grid; line-height: 1.35; }
.tree__node small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.tree__av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: 14px; background: #e3e7f6; color: #3b4370; flex: none; transition: background .4s ease, color .4s ease; }
.tree__caller .tree__av { background: #0b1561; color: #fff; position: relative; }
.tree__caller .tree__av::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--m-cyan); opacity: 0; }
.tree.is-ringing .tree__caller .tree__av::after { animation: tree-ring .65s ease-out 1; }
@keyframes tree-ring { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.5); } }
.tree__hub { background: #0b1561; color: #f2f4ff; border-color: transparent; padding: 12px 18px; font-weight: 600; }
.tree__hub img { border-radius: 8px; }
.tree.is-hub .tree__hub { box-shadow: 0 0 0 6px rgba(0, 195, 224, .18), 0 10px 30px rgba(11, 21, 97, .2); }
.tree__agent em { font-style: normal; font-size: 12.5px; font-weight: 600; color: #0a7a52; max-width: 0; overflow: hidden; opacity: 0; transition: max-width .4s ease, opacity .4s ease; }
.tree__agent.is-on { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--m-line) border-box; border: 1.5px solid transparent; box-shadow: 0 14px 34px rgba(22, 206, 156, .18); }
.tree__agent.is-on .tree__av { background: #1a2c8c; color: #fff; }
.tree__agent.is-on em { max-width: 120px; opacity: 1; }
.tree--v .tree__agent { flex-direction: column; gap: 6px; padding: 10px 6px; text-align: center; font-size: 13px; width: calc(25% - 8px); justify-content: center; }
.tree--v .tree__agent span { justify-items: center; }
.tree--v .tree__agent small { font-size: 11px; }
.tree--v .tree__agent em { font-size: 11px; max-width: none; max-height: 0; }
.tree--v .tree__agent.is-on em { max-height: 20px; }
.tree--v .tree__av { width: 32px; height: 32px; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .tree__node, .tree__av, .tree__lit path { transition: none; } }
.tree:not(.tree--v) .tree__agent, .tree:not(.tree--v) .tree__caller { width: 200px; }
.tree:not(.tree--v) .tree__agent em { margin-inline-start: auto; }
.tree__node small[dir="ltr"] { direction: ltr; unicode-bidi: isolate; text-align: start; }
html[dir="rtl"] .tree__node small[dir="ltr"] { text-align: right; }
.tree:not(.tree--v) .tree__agent { width: 228px; }

/* ---------- Call reports card: mini dashboard demo ---------- */
#services .mini--dash { transform: none; width: 100%; max-width: 360px; gap: 10px; background: #fff; border: 1px solid #e3e7f4; border-radius: 14px; padding: 14px; box-shadow: 0 12px 30px rgba(11, 21, 97, .07); font-size: 12px; }
.dash__top { display: flex; align-items: center; justify-content: space-between; }
.dash__top b { font-weight: 600; font-size: 13px; }
.dash__top--sub b { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.dash__live { display: inline-flex; align-items: center; gap: 6px; color: #0a7a52; font-weight: 500; font-size: 11.5px; }
.dash__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--m-teal); box-shadow: 0 0 0 3px rgba(22, 206, 156, .2); animation: m-pulse 1.6s ease-in-out infinite; }
.dash__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dash__kpis div { background: #f5f6fb; border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.dash__kpis small { color: var(--muted); font-size: 10.5px; }
.dash__kpis b { font-size: 17px; font-weight: 600; line-height: 1.1; direction: ltr; unicode-bidi: isolate; text-align: start; }
html[dir="rtl"] .dash__kpis b { text-align: right; }
.dash__kpis div:nth-child(2) b { color: #0a7a52; } .dash__kpis div:nth-child(3) b { color: #b4541d; }
.dash__chart { display: grid; gap: 4px; }
.dash__bars { display: flex; align-items: flex-end; gap: 5px; height: 64px; border-bottom: 1px solid #eef0f8; }
.dash__bars i { flex: 1; height: calc(var(--h) * 1%); border-radius: 3px 3px 1px 1px; background: #cfd6f0; transform-origin: bottom; }
.dash__bars i.hi { background: linear-gradient(0deg, var(--m-blue), var(--m-teal)); }
.dash__hrs { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.dash__agents { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dash__agents li { display: grid; grid-template-columns: 58px 1fr 22px; align-items: center; gap: 8px; }
.dash__agents span { white-space: nowrap; font-size: 11.5px; }
.dash__agents i { height: 6px; border-radius: 3px; background: #eef0f8; position: relative; overflow: hidden; }
.dash__agents i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--w) * 1%); border-radius: 3px; background: var(--m-line); }
html[dir="rtl"] .dash__agents i::after { background: linear-gradient(270deg, var(--m-blue), var(--m-cyan) 45%, var(--m-teal) 75%, var(--m-green)); }
.dash__agents b { font-weight: 600; text-align: end; font-size: 11.5px; }
@media (prefers-reduced-motion: no-preference) {
  .card:hover .dash__bars i { animation: dash-grow .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--h) * 4ms); }
  .card:hover .dash__agents i::after { animation: dash-fill .8s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes dash-grow { from { transform: scaleY(.15); } }
@keyframes dash-fill { from { width: 0; } }

/* ---------- Black + navy theme (Marwan, 2026-11-27): black page ground, navy bands,
   dark cards inside the panels. The hero call window stays a light app screen. ---------- */
:root { --m-card: #0e1336; --m-card-2: #161d4a; --m-card-line: rgba(242, 244, 255, .10); --m-ok: #3ee0a8; --m-warn: #ff9a5c; }
#services .card--open > .panel { background: #0a0e2a; }
.mini .chip-row, .mini .num, .mini .wave, .mini .bars, #services .mini--dash, .tree__node:not(.tree__hub) {
  background: var(--m-card); border-color: var(--m-card-line); color: var(--ink); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.mini .av--g, .tree__av { background: #222a5c; color: #c9cff0; }
.mini .ok, .dash__live, .tree__agent em, .dash__kpis div:nth-child(2) b { color: var(--m-ok) !important; }
.dash__kpis div:nth-child(3) b { color: var(--m-warn); }
.dash__kpis div { background: var(--m-card-2); }
.mini .bars i, .dash__bars i { background: #2a3266; }
.dash__bars { border-bottom-color: var(--m-card-line); }
.dash__agents i { background: rgba(242, 244, 255, .08); }
.tree__caller .tree__av, .tree__agent.is-on .tree__av { background: var(--m-blue); color: #fff; }
.tree__agent.is-on { background: linear-gradient(var(--m-card), var(--m-card)) padding-box, var(--m-line) border-box; box-shadow: 0 14px 34px rgba(22, 206, 156, .22); }
.tree__hub { background: var(--m-night); border: 1px solid rgba(242, 244, 255, .16); }
.tree__base path { opacity: .35; } .tree__base path.is-dim { opacity: .14; }
.tree__dot { fill: #05060d; }
.mform :is(input, select, textarea) { background: var(--m-card); border-color: rgba(242, 244, 255, .18); color: var(--ink); }
.mform :is(input, textarea)::placeholder { color: #6f78a6; }
.mform select option { background: var(--m-card); color: var(--ink); }
.mform [aria-invalid="true"] { border-color: #ff6b62; } .mform .field__error { color: #ff8a82; }

/* hero call window: agent cards stay inside the routing column */
.callwin__body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) !important; }
.callwin__route, .callwin__caller { min-width: 0; }
.callwin .agent { min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.callwin .agent span { min-width: 0; flex: 1 1 auto; }
.callwin .agent small { white-space: normal !important; }
.callwin .agent em { margin-inline-start: auto; }
@media (min-width: 1024px) { .callwin__route { padding: 24px 16px; } .callwin .agent { padding: 12px; gap: 10px; } }
.who__num { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .callwin__app { inset: 20px 20px auto 20px; font-size: 14px; }
  .callwin__card { display: none; }
  .callwin__caller { padding: 22px 18px; gap: 16px; }
  .kv { font-size: 13.5px; }
}

/* soft fades between the navy bands and the black ground */
.hero.m-night, #about.ground-inverse { position: relative; isolation: isolate; }
.hero.m-night::after, #about.ground-inverse::before, #about.ground-inverse::after { content: ""; position: absolute; left: 0; right: 0; height: 220px; pointer-events: none; z-index: -1; }
.hero.m-night::after { bottom: 0; background: linear-gradient(180deg, rgba(5, 6, 13, 0), #05060d); }
#about.ground-inverse::before { top: 0; background: linear-gradient(0deg, rgba(5, 6, 13, 0), #05060d); }
#about.ground-inverse::after { bottom: 0; background: linear-gradient(180deg, rgba(5, 6, 13, 0), #05060d); }

/* hero call window, round 2: wider column, more air */
@media (min-width: 1024px) {
  .hero-split { column-gap: 48px; }
  .callwin__app { inset: 40px 40px auto 40px; }
  .callwin__body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) !important; }
  .callwin__caller { padding: 32px 30px; gap: 22px; }
  .kv { gap: 14px; } .kv div { padding-top: 14px; }
  .callwin__route { padding: 30px 22px; gap: 14px; }
  .callwin .agent { padding: 14px 16px; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .callwin__app { inset: 24px 24px auto 24px; } .callwin__caller { padding: 24px 20px; } .callwin__route { padding: 24px 14px; } }

/* ---------- Voice greeting card: IVR demo player ---------- */
#services .mini--ivr { transform: none; width: 100%; max-width: 360px; gap: 12px; padding: 14px; border-radius: 14px; background: var(--m-card); border: 1px solid var(--m-card-line); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); color: var(--ink); }
.ivr__now { display: flex; align-items: center; gap: 12px; }
.ivr__play { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--m-blue), var(--m-teal)); box-shadow: 0 6px 18px rgba(0, 108, 246, .35); }
.ivr__play svg { width: 16px; height: 16px; }
html[dir="rtl"] .ivr__play .i-play { transform: scaleX(-1); }
.ivr .i-pause, .ivr.is-playing .i-play { display: none; } .ivr.is-playing .i-pause { display: block; }
.ivr__meta { display: grid; gap: 6px; min-width: 0; flex: 1; }
.ivr__meta b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#services .ivr .wave { height: 28px; background: none; border: 0; gap: 3px; justify-content: flex-start; padding: 0; }
#services .ivr .wave i { width: 3px; height: calc(var(--h) * .5px); opacity: .45; }
.ivr.is-playing .wave i { opacity: 1; animation: m-wave .9s ease-in-out infinite alternate; animation-delay: calc(var(--h) * -18ms); }
.ivr__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ivr__list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--m-card-line); background: var(--m-card-2); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; text-align: start; transition: border-color .2s ease, background .2s ease; }
.ivr__list button:hover { border-color: rgba(0, 195, 224, .5); }
.ivr__list button s { text-decoration: none; color: var(--muted); font-size: 11px; }
.ivr__list button.is-on { background: linear-gradient(var(--m-card-2), var(--m-card-2)) padding-box, var(--m-line) border-box; border-color: transparent; }
.ivr__list button.is-on span { color: var(--m-ok); font-weight: 600; }
.ivr__play:focus-visible, .ivr__list button:focus-visible { outline: 2px solid var(--m-cyan); outline-offset: 2px; }
@media (max-width: 639px) { #services .card--open > .panel:has(.mini--ivr) { --p-h: 250px; } }
@media (prefers-reduced-motion: reduce) { .ivr.is-playing .wave i { animation: none; } }
.ivr__list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ivr__list button { padding: 8px; gap: 4px; font-size: 11.5px; } .ivr__list button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ivr__list button s { flex: none; }
