/* =====================================================================
   dataxo layer (loaded after style.css)
   1. Light theme rework   2. Brand bands   3. The "d" icon + motion
   4. Home brand stage     5. Hero dashboard   6. Site-wide icon touches
   7. Motion helpers       8. Ahmed assistant  9. Reduced motion
   ===================================================================== */

/* ---------- 1. Light theme: Mist ground, white cards, Midnight bands ---------- */
:root[data-theme="light"] {
  --page: #F1F7F5;
  --page-alt: #E1EEEA;
  --surface: #FFFFFF;
  --surface-2: #EAF3F0;
  --surface-3: #D3E6E1;
  --border: rgba(18, 32, 42, .10);
  --border-strong: rgba(18, 32, 42, .22);
  --text: #0D1A23;
  --text-2: #284450;
  --muted: #46696A;
  --accent-text: #B34B20;
  --accent-soft: rgba(41, 88, 92, .09);
  --hl: #23595D;
  --hl-soft: rgba(41, 88, 92, .10);
  --good: #23595D; --good-fill: #29585C;
  --grid: #DCE9E5;
  --axis: #AFCBC4;
  --shadow: 0 1px 2px rgba(18, 32, 42, .05), 0 14px 36px rgba(18, 32, 42, .10);
  --shadow-s: 0 1px 2px rgba(18, 32, 42, .05), 0 6px 18px rgba(18, 32, 42, .06);
  --c2: #5E9C98;
}
:root[data-theme="light"] .nav { background: rgba(255, 255, 255, .86); box-shadow: 0 1px 0 rgba(18, 32, 42, .06), 0 8px 24px rgba(18, 32, 42, .05); }
:root[data-theme="light"] .card,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .pillar,
:root[data-theme="light"] .kpi,
:root[data-theme="light"] .stat,
:root[data-theme="light"] .hero-panel { box-shadow: var(--shadow-s); border-color: rgba(18, 32, 42, .09); }
:root[data-theme="light"] a.card:hover,
:root[data-theme="light"] .pillar:hover { box-shadow: var(--shadow); }
:root[data-theme="light"] .section.alt { background: linear-gradient(180deg, #E4F0EC, #EBF4F1); border-color: rgba(41, 88, 92, .12); }
:root[data-theme="light"] .btn.ghost { border-color: rgba(41, 88, 92, .35); color: var(--dx-midnight); }
:root[data-theme="light"] .btn.ghost:hover { background: var(--dx-midnight); color: var(--dx-mist); border-color: var(--dx-midnight); }
:root[data-theme="light"] .chip { background: #EEF6F4; border-color: rgba(41, 88, 92, .16); color: #284450; }
:root[data-theme="light"] .chip.accent { background: rgba(248, 97, 2, .10); color: #7A3412; }
:root[data-theme="light"] .icon-btn { background: #fff; border-color: rgba(18, 32, 42, .12); }
:root[data-theme="light"] .eyebrow { color: var(--accent-text); }
:root[data-theme="light"] .hero h1 .accent { color: var(--dx-teal); }
:root[data-theme="light"] .hero-tag { color: var(--dx-teal); }
:root[data-theme="light"] .hero { background: radial-gradient(900px 420px at 85% 10%, rgba(152, 202, 193, .35), transparent 70%), var(--page); }
:root[data-theme="light"] .dd-menu { box-shadow: var(--shadow); }

/* ---------- 2. Brand bands: always Midnight/Void, in both themes ---------- */
.dx-stage,
:root[data-theme="light"] .page-head,
:root[data-theme="light"] .footer {
  --text: #EEF6F4; --text-2: #C6DCD8; --muted: #8FB5AF; --hl: #98CAC1; --hl-soft: rgba(152, 202, 193, .12);
  --accent-text: #F86102; --accent-soft: rgba(152, 202, 193, .10); --surface: #12202A; --surface-2: #0B1620; --surface-3: #1B2F3A;
  --border: rgba(152, 202, 193, .14); --border-strong: rgba(152, 202, 193, .28); --dxi-c: #98CAC1;
  color: var(--text);
}
:root[data-theme="light"] .page-head { background: radial-gradient(700px 300px at 90% 0%, rgba(41, 88, 92, .55), transparent 70%), linear-gradient(180deg, #12202A, #0B1620); border-bottom: 0; }
:root[data-theme="light"] .page-head h1, :root[data-theme="light"] .page-head h2 { color: #EEF6F4; }
:root[data-theme="light"] .page-head .chip { background: rgba(152, 202, 193, .10); border-color: rgba(152, 202, 193, .2); color: #C6DCD8; }
:root[data-theme="light"] .page-head .btn.ghost { color: #EEF6F4; border-color: rgba(152, 202, 193, .35); }
:root[data-theme="light"] .footer { background: #12202A; border-top: 0; }
:root[data-theme="light"] .footer .lg-dark { display: block; }
:root[data-theme="light"] .footer .lg-light { display: none; }

/* ---------- 3. The "d" icon (drawn, never typed) ---------- */
.dxi { display: block; width: 100%; height: 100%; overflow: visible; --dxi-c: #98CAC1; }
:root[data-theme="light"] .dxi { --dxi-c: #12202A; }
:root[data-theme] .dx-stage .dxi, :root[data-theme="light"] .page-head .dxi, :root[data-theme="light"] .footer .dxi { --dxi-c: #98CAC1; }
.dxi rect { fill: var(--dxi-c); }
.dxi path { fill: none; stroke: var(--dxi-c); stroke-width: 15; }
.dxi .dxi-a2 { stroke: #F86102; }
.dxi-b { transform-box: fill-box; transform-origin: 50% 100%; }
.dxi-play .dxi-b, .dxi-draw .dxi-b { transform: scaleY(0); }
.dxi-play .dxi-a, .dxi-draw .dxi-a { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.go .dxi-play .dxi-b, .dxi-draw .dxi-b { animation: dxBar .75s cubic-bezier(.2, .9, .3, 1.25) both, dxBreath 4.2s ease-in-out infinite; }
.go .dxi-play .dxi-b1, .dxi-draw .dxi-b1 { animation-delay: .25s, 2.6s; }
.go .dxi-play .dxi-b2, .dxi-draw .dxi-b2 { animation-delay: .4s, 3.0s; }
.go .dxi-play .dxi-b3, .dxi-draw .dxi-b3 { animation-delay: .55s, 3.4s; }
.go .dxi-play .dxi-a, .dxi-draw .dxi-a { animation: dxDraw .8s cubic-bezier(.5, 0, .2, 1) forwards; }
.go .dxi-play .dxi-a1, .dxi-draw .dxi-a1 { animation-delay: .75s; }
.go .dxi-play .dxi-a2, .dxi-draw .dxi-a2 { animation: dxDraw .8s cubic-bezier(.5, 0, .2, 1) 1s forwards, dxGlow 3.2s ease-in-out 2.4s infinite; }
.go .dxi-play .dxi-a3, .dxi-draw .dxi-a3 { animation-delay: 1.25s; }
.dxi-draw .dxi-b { animation-iteration-count: 1, 1; }
.dxi-draw .dxi-a2 { animation: dxDraw .8s cubic-bezier(.5, 0, .2, 1) 1s forwards; }

@keyframes dxBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dxBreath { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.78); } }
@keyframes dxDraw { to { stroke-dashoffset: 0; } }
@keyframes dxGlow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(248, 97, 2, 0)); } 50% { filter: drop-shadow(0 0 5px rgba(248, 97, 2, .85)); } }
@keyframes dxUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dxSpin { to { transform: rotate(360deg); } }
@keyframes dxFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vmax, 4vmax) scale(1.12); } }
@keyframes dxDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(120px, 120px, 0); } }
@keyframes dxSky { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dxEq { from { transform: scaleY(1); } to { transform: scaleY(.72); } }
@keyframes dxTile { from { scale: .55; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes dxLetter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes dxShine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes dxLineX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dxLineY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dxCue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes dxPop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes dxPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3); opacity: 0; } }
@keyframes dxGrowY { to { transform: scaleY(1); } }
@keyframes dxGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dxArea { to { opacity: .14; } }
@keyframes dxOn { to { opacity: 1; } }

/* ---------- 4. Home brand stage ---------- */
.dx-stage {
  position: relative; overflow: hidden; isolation: isolate; background: #080112;
  min-height: min(calc(100svh - var(--nav-h)), 860px); display: grid; place-items: center; padding: 3rem 0 4.5rem;
}
.dxs-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dxs-glow { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; filter: blur(40px); }
.dxs-glow.g1 { top: -28vmax; left: -18vmax; background: radial-gradient(circle, rgba(41, 88, 92, .85), transparent 62%); animation: dxFloat 16s ease-in-out infinite alternate; translate: calc(var(--px, 0) * -36px) calc(var(--py, 0) * -36px); }
.dxs-glow.g2 { bottom: -34vmax; right: -24vmax; background: radial-gradient(circle, rgba(152, 202, 193, .30), transparent 62%); animation: dxFloat 20s ease-in-out infinite alternate-reverse; translate: calc(var(--px, 0) * 30px) calc(var(--py, 0) * 30px); }
.dxs-glyph {
  position: absolute; inset: -120px; opacity: .08; animation: dxDrift 48s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120' fill='none' stroke='%2398CAC1' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M28 18a10 10 0 1 1-10-10'/%3E%3Cpath d='M80 28v-6M88 28v-12M96 28v-18'/%3E%3Cpath d='M13 83l10 10M23 83l-10 10'/%3E%3Cpath d='M88 82v14M81 89h14'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}
.dxs-sky { position: absolute; inset-inline: 0; bottom: 0; height: 30%; display: flex; align-items: flex-end; gap: .7%; padding: 0 3%; direction: ltr; -webkit-mask-image: linear-gradient(to top, #000 10%, transparent); mask-image: linear-gradient(to top, #000 10%, transparent); }
.dxs-sky i { flex: 1; height: var(--h); border-radius: 5px 5px 0 0; background: linear-gradient(to top, rgba(152, 202, 193, 0), rgba(152, 202, 193, .2)); transform-origin: 50% 100%; transform: scaleY(0); }
.dxs-sky i.bz { background: linear-gradient(to top, rgba(248, 97, 2, 0), rgba(248, 97, 2, .6)); }
.go .dxs-sky i { animation: dxSky 1.3s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 35ms) both, dxEq 4.8s ease-in-out calc(1.6s + var(--i) * 110ms) infinite alternate; }

.dxs-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  opacity: calc(1 - var(--sp, 0) * 1.3); transform: translateY(calc(var(--sp, 0) * 70px)) scale(calc(1 - var(--sp, 0) * .06));
}
.dxs-fig { --tw: clamp(180px, 23vw, 290px); --gap: clamp(30px, 5vw, 76px); position: relative; width: var(--tw); height: var(--tw); margin: .5rem 0 3.4rem; }
.dxs-tile {
  all: unset; position: absolute; inset: 0; cursor: pointer; border-radius: 24%;
  background: radial-gradient(120% 120% at 20% 10%, #1B3442, #12202A 45%, #0B1620);
  box-shadow: 0 0 0 1px rgba(152, 202, 193, .18) inset, 0 40px 90px rgba(0, 0, 0, .6), 0 0 140px rgba(152, 202, 193, .12);
  transform: perspective(900px) rotateY(calc(var(--px, 0) * 12deg)) rotateX(calc(var(--py, 0) * -12deg));
  opacity: 0;
}
.go .dxs-tile { animation: dxTile 1s cubic-bezier(.2, .9, .3, 1.15) both; }
.dxs-tile:focus-visible { outline: 2px solid #F86102; outline-offset: 6px; }
.dxs-tile .dxi { position: absolute; inset: 0; }
.dxs-orbit { position: absolute; inset: -24%; pointer-events: none; opacity: 0; }
.go .dxs-orbit { animation: dxFade 1.2s ease 1.3s both; }
.dxs-orbit span { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(152, 202, 193, .22); animation: dxSpin 46s linear infinite; }
.dxs-orbit .o2 { inset: 10%; border: 1px solid rgba(152, 202, 193, .08); animation-duration: 28s; animation-direction: reverse; }
.dxs-orbit span::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; top: 50%; left: -4px; margin-top: -4px; background: #F86102; box-shadow: 0 0 14px #F86102; }
.dxs-orbit .o2::after { top: -4px; left: 50%; margin: 0 0 0 -3px; width: 6px; height: 6px; background: #98CAC1; box-shadow: 0 0 10px #98CAC1; }

.dxs-tag { position: absolute; display: flex; flex-direction: column; white-space: nowrap; line-height: 1.3; opacity: 0; }
.dxs-tag b { font-weight: 700; font-size: 1rem; color: #EEF6F4; }
.dxs-tag small { font-size: .74rem; color: #8FB5AF; }
.dxs-tag::before { content: ""; position: absolute; background: linear-gradient(90deg, rgba(152, 202, 193, .9), rgba(152, 202, 193, .15)); }
.t-data { right: calc(100% + var(--gap)); top: 41%; align-items: flex-end; text-align: right; }
.t-data::before { left: calc(100% + 10px); top: .75em; height: 1px; width: calc(var(--gap) - 10px + var(--tw) * .23); background: linear-gradient(90deg, rgba(152, 202, 193, .15), rgba(152, 202, 193, .9)); transform-origin: 0 50%; }
.t-insight { left: calc(100% + var(--gap)); top: 47%; align-items: flex-start; text-align: left; }
.t-insight b { color: #F86102; }
.t-insight::before { right: calc(100% + 10px); top: .75em; height: 1px; width: calc(var(--gap) - 10px + var(--tw) * .25); background: linear-gradient(90deg, #F86102, rgba(248, 97, 2, .2)); transform-origin: 100% 50%; }
.t-decision { top: calc(100% + 14px); left: 52%; align-items: flex-start; text-align: left; }
.t-decision::before { left: 2px; bottom: calc(100% + 4px); width: 1px; height: calc(18px + var(--tw) * .22); background: linear-gradient(0deg, rgba(152, 202, 193, .15), rgba(152, 202, 193, .9)); transform-origin: 50% 100%; }
.go .dxs-tag { animation: dxUp .7s cubic-bezier(.2, .8, .2, 1) both; }
.go .t-data { animation-delay: 1.55s; }
.go .t-insight { animation-delay: 1.8s; }
.go .t-decision { animation-delay: 2.05s; }
.go .t-data::before, .go .t-insight::before { animation: dxLineX .6s ease both; animation-delay: inherit; }
.go .t-decision::before { animation: dxLineY .6s ease both; animation-delay: inherit; }

.dxs-word { width: clamp(220px, 32vw, 430px); margin-top: .4rem; }
.dxw { display: block; width: 100%; height: auto; overflow: visible; --wm: #98CAC1; }
.dxw rect, .dxw path { fill: var(--wm); }
.dxw .s { fill: none; stroke: var(--wm); stroke-width: 16; }
.dxw .bz { fill: #F86102; }
.dxw .s.bz { fill: none; stroke: #F86102; }
.dxw-play .dxw-l { opacity: 0; }
.go .dxw-play .dxw-l { animation: dxLetter .75s cubic-bezier(.2, .8, .2, 1) calc(1.15s + var(--i) * 90ms) both; }
.dxs-slogan {
  font: 800 clamp(1.5rem, 3.4vw, 2.6rem) / 1.15 var(--font-en); letter-spacing: -.5px; margin-top: 1.1rem;
  background: linear-gradient(100deg, #EEF6F4 20%, #98CAC1 40%, #EEF6F4 60%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0;
}
.go .dxs-slogan { animation: dxUp .8s ease 1.8s both, dxShine 7s linear 2.6s infinite; }
.dxs-slogan-ar { font-family: "Noto Kufi Arabic", var(--font-ar); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.4rem); color: #98CAC1; margin-top: .3rem; opacity: 0; }
.go .dxs-slogan-ar { animation: dxUp .8s ease 2s both; }
.dxs-cap { max-width: 640px; color: #8FB5AF; font-size: .95rem; margin-top: .9rem; opacity: 0; }
.go .dxs-cap { animation: dxUp .8s ease 2.25s both; }
.dxs-cue { margin-top: 1.8rem; width: 26px; height: 42px; border: 2px solid rgba(152, 202, 193, .4); border-radius: 14px; position: relative; display: block; opacity: 0; }
.go .dxs-cue { animation: dxFade .8s ease 2.6s both; }
.dxs-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #F86102; animation: dxCue 1.8s ease-in-out infinite; }
@media (max-width: 820px) {
  .dxs-tag { display: none; }
  .dxs-fig { margin-bottom: 1.6rem; }
}

/* ---------- 5. Hero dashboard ---------- */
.hero-panel.hd { padding: 1rem; position: relative; overflow: hidden; }
.hero-panel.hd::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--dx-teal), var(--dx-mint), var(--dx-blaze)); }
.hd-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: .5rem; }
.hk {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .65rem .75rem .45rem; min-width: 0;
  transition: transform .25s var(--ease), border-color .25s; opacity: 0;
}
.play .hk { animation: dxUp .6s cubic-bezier(.2, .8, .2, 1) calc(var(--d) * 110ms) both; }
.hk:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.hk-top { display: flex; align-items: center; gap: .45rem; }
.hk-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--hl-soft); color: var(--hl); flex-shrink: 0; }
.hk-top small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.hk-val { display: block; font-size: clamp(1rem, 1.6vw, 1.25rem); margin: .3rem 0 .15rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk:nth-child(2) .hk-val { color: var(--accent-text); }
.hk-foot { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.hk-foot .delta { font-size: .72rem; }
.hk-foot small { font-size: .68rem; color: var(--muted); }
.hk-spark { display: block; width: 100%; height: 30px; margin-top: .35rem; overflow: visible; }
.sp-line { fill: none; stroke: var(--hl); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.sp-area { fill: var(--hl); opacity: 0; }
.sp-dot { opacity: 0; }
.sp-dot.hi { fill: var(--hl); }
.sp-dot.lo { fill: var(--bad-fill); }
.play .sp-line { animation: dxDraw 1.3s cubic-bezier(.4, 0, .2, 1) calc(.35s + var(--d) * 120ms) forwards; }
.play .sp-area { animation: dxArea .9s ease calc(1.1s + var(--d) * 120ms) forwards; }
.play .sp-dot { animation: dxOn .4s ease calc(1.5s + var(--d) * 120ms) forwards; }

.hd-chart { min-height: 236px; }
.hd-chart svg { display: block; overflow: visible; }
.hd-grid { stroke: var(--grid); stroke-dasharray: 2 4; }
.hd-ax { fill: var(--muted); font: 500 10px var(--mono); }
.hd-lbl { fill: var(--muted); font-size: 10.5px; }
.hd-prev { fill: none; stroke: var(--dx-sage); stroke-width: 1.6; stroke-dasharray: 5 4; opacity: 0; }
:root[data-theme="light"] .hd-prev { stroke: #7FA3A1; }
.hd-line { fill: none; stroke: var(--hl); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.ga1 { stop-color: var(--hl); stop-opacity: .32; }
.ga2 { stop-color: var(--hl); stop-opacity: 0; }
.hd-area { opacity: 0; }
.play .hd-prev { animation: dxOn .8s ease .2s forwards; }
.play .hd-line { animation: dxDraw 1.8s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
.play .hd-area { animation: dxOn 1s ease 1.2s forwards; }
.hd-mk { opacity: 0; transform-box: fill-box; transform-origin: center; }
.play .hd-mk { animation: dxPop .5s cubic-bezier(.2, .9, .3, 1.4) calc(1.1s + var(--d) * 90ms) both; }
.hd-mk circle { fill: var(--surface); stroke-width: 2; }
.hd-mk text { font: 600 10px var(--mono); }
.hd-mk.pk circle { stroke: var(--hl); }
.hd-mk.pk path { fill: var(--hl); }
.hd-mk.pk text { fill: var(--hl); }
.hd-mk.tr circle { stroke: var(--bad-fill); }
.hd-mk.tr path { fill: var(--bad-fill); }
.hd-mk.tr text { fill: var(--bad); }
.hd-mk.top circle { fill: var(--accent); stroke: none; }
.hd-mk.top .pulse { fill: none; stroke: var(--accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: dxPulse 2.4s ease-out 2.8s infinite; }
.hd-mk.top text { fill: var(--accent-text); font: 700 11px var(--font-en); }
.hd-zero { stroke: var(--axis); }
.hd-mom { transform-box: fill-box; transform: scaleY(0); }
.hd-mom.up { fill: var(--good-fill); transform-origin: 50% 100%; }
.hd-mom.dn { fill: var(--bad-fill); transform-origin: 50% 0; }
.play .hd-mom { animation: dxGrowY .6s cubic-bezier(.2, .8, .2, 1) calc(1s + var(--d) * 60ms) forwards; }
.hd-hit { fill: transparent; cursor: crosshair; }
.hd-guide { stroke: var(--border-strong); stroke-dasharray: 3 3; opacity: 0; transition: opacity .15s; pointer-events: none; }
.hd-guide.on { opacity: 1; }
.hd-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: .72rem; color: var(--muted); margin-top: .35rem; }
.hd-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-inline-end: .35rem; vertical-align: middle; }
.hd-legend .l-cur { background: var(--hl); }
.hd-legend .l-prev { background: repeating-linear-gradient(90deg, var(--dx-sage) 0 4px, transparent 4px 7px); }
.hd-legend .l-pk, .hd-legend .l-tr { width: 0; height: 0; border-radius: 0; border-inline: 5px solid transparent; }
.hd-legend .l-pk { border-bottom: 7px solid var(--hl); }
.hd-legend .l-tr { border-top: 7px solid var(--bad-fill); }
.hd-legend .l-mom { width: 8px; height: 11px; background: linear-gradient(var(--good-fill) 50%, var(--bad-fill) 50%); }
.hd-sim { margin-inline-start: auto; font-style: italic; }
@media (max-width: 400px) { .hd-kpis { grid-template-columns: 1fr 1fr; gap: .45rem; } .hk { padding: .55rem .55rem .4rem; } }

/* ---------- 6. The icon across the site ---------- */
.eyebrow::before { width: 22px; height: 22px; margin: -4px; border-radius: 0; background: url("../assets/brand/dataxo_icon_transparent_for-dark.svg") center / contain no-repeat; }
:root[data-theme="light"] .eyebrow::before { background-image: url("../assets/brand/dataxo_icon_transparent_for-light.svg"); }
:root[data-theme="light"] .page-head .eyebrow::before { background-image: url("../assets/brand/dataxo_icon_transparent_for-dark.svg"); }
.page-head { position: relative; overflow: hidden; }
.page-head > .container { position: relative; z-index: 1; }
.ph-mark { position: absolute; inset-inline-end: max(-40px, calc((100vw - 1200px) / 2 - 60px)); top: 50%; width: clamp(150px, 20vw, 270px); aspect-ratio: 1; translate: 0 -50%; opacity: .16; pointer-events: none; }
.footer { position: relative; overflow: hidden; }
.footer > .container { position: relative; z-index: 1; }
.ft-mark { position: absolute; inset-inline-end: -60px; bottom: -70px; width: 280px; aspect-ratio: 1; opacity: .06; pointer-events: none; }
.logo:hover img { animation: dxLogoNudge .6s ease; }
@keyframes dxLogoNudge { 40% { transform: translateY(-2px) scale(1.03); } }
.to-top {
  position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; border-radius: 14px;
  border: 1px solid rgba(152, 202, 193, .25); background: #12202A; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
:root .to-top .dxi { width: 40px; height: 40px; --dxi-c: #98CAC1; }
.to-top::after { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-bottom-color: #F86102; border-top: 0; }
.to-top:hover { transform: translateY(-3px); }

/* ---------- 7. Motion helpers ---------- */
.grid > .reveal:nth-child(2), .pillars > .reveal:nth-child(2), .lesson-grid > .reveal:nth-child(2) { transition-delay: .08s; }
.grid > .reveal:nth-child(3), .pillars > .reveal:nth-child(3), .lesson-grid > .reveal:nth-child(3) { transition-delay: .16s; }
.grid > .reveal:nth-child(4), .lesson-grid > .reveal:nth-child(4) { transition-delay: .24s; }
.grid > .reveal:nth-child(5) { transition-delay: .32s; }
.grid > .reveal:nth-child(6) { transition-delay: .4s; }
.pillar .p-ico img { transition: transform .4s var(--ease); }
.pillar:hover .p-ico img { transform: rotate(-6deg) scale(1.08); }
.card .c-ico { transition: transform .3s var(--ease), background .3s; }
.card:hover .c-ico { transform: translateY(-2px) scale(1.06); }
.grow-x .mark { transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); }
.grow-x.in .mark { animation: dxGrowX 1s cubic-bezier(.2, .8, .2, 1) .15s forwards; }
.grow-x .val { opacity: 0; }
.grow-x.in .val { animation: dxOn .5s ease 1s forwards; }
.dj-step { transition: transform .3s var(--ease); }
.dj.in .dj-step { animation: dxUp .6s cubic-bezier(.2, .8, .2, 1) both; }
.dj.in .dj-step:nth-of-type(2) { animation-delay: .12s; }
.dj.in .dj-step:nth-of-type(3) { animation-delay: .24s; }
.dj.in .dj-step:nth-of-type(4) { animation-delay: .36s; }
.dj.in .dj-step:nth-of-type(5) { animation-delay: .48s; }

/* ---------- 8. Ahmed assistant ---------- */
.ai-fab {
  position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 120; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 30% 25%, #1F3B4A, #12202A 70%); box-shadow: 0 0 0 1px rgba(152, 202, 193, .3) inset, 0 14px 34px rgba(0, 0, 0, .4);
  display: grid; place-items: center; transition: transform .25s var(--ease);
}
.ai-fab:hover { transform: translateY(-3px) scale(1.04); }
.ai-fab svg { width: 34px; height: 34px; }
.ai-fab::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(248, 97, 2, .55); animation: dxPulse 2.6s ease-out infinite; pointer-events: none; }
.ai-fab.open::before, .ai-fab.seen::before { display: none; }
.ai-fab .ai-badge { position: absolute; top: -4px; inset-inline-end: -4px; background: #F86102; color: #080112; font: 800 .68rem var(--font-en); padding: .1rem .4rem; border-radius: 999px; }
.ai-fab.seen .ai-badge { display: none; }
.ai-hint {
  position: fixed; inset-inline-end: 88px; bottom: 30px; z-index: 119; background: #12202A; color: #EEF6F4; border: 1px solid rgba(152, 202, 193, .25);
  padding: .55rem .85rem; border-radius: 12px; font-size: .86rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); max-width: 230px; animation: dxUp .5s ease both;
}
.ai-panel {
  position: fixed; inset-inline-end: 18px; bottom: 90px; z-index: 121; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100svh - 120px));
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; overflow: hidden; animation: dxUp .35s cubic-bezier(.2, .8, .2, 1) both;
}
.ai-head { display: flex; align-items: center; gap: .65rem; padding: .8rem .9rem; background: linear-gradient(120deg, #12202A, #1B3442); color: #EEF6F4; }
.ai-head .ai-ava { width: 38px; height: 38px; border-radius: 12px; background: #080112; display: grid; place-items: center; flex-shrink: 0; }
.ai-head .ai-ava svg { width: 28px; height: 28px; }
.ai-head b { display: block; font-size: 1rem; }
.ai-head small { color: #98CAC1; font-size: .74rem; display: flex; align-items: center; gap: .3rem; }
.ai-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #98CAC1; box-shadow: 0 0 6px #98CAC1; }
.ai-head .ai-x { margin-inline-start: auto; background: none; border: 0; color: #C6DCD8; font-size: 1.1rem; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.ai-head .ai-x:hover { background: rgba(152, 202, 193, .12); }
.ai-log { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .6rem; background: var(--page); }
.ai-msg { max-width: 88%; padding: .55rem .8rem; border-radius: 14px; font-size: .9rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; animation: dxUp .3s ease both; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-start-start-radius: 4px; color: var(--text); }
.ai-msg.me { align-self: flex-end; background: #F86102; color: #080112; border-start-end-radius: 4px; font-weight: 600; }
.ai-msg.bot b { color: var(--hl); }
.ai-msg.err { border-color: var(--bad-fill); }
.ai-typing { display: inline-flex; gap: 4px; padding: .2rem 0; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--hl); animation: dxTyping 1s ease-in-out infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; }
.ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dxTyping { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.ai-sugg { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 .9rem .6rem; background: var(--page); }
.ai-sugg button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: .25rem .7rem; font-size: .78rem; cursor: pointer; }
.ai-sugg button:hover { border-color: var(--accent); color: var(--text); }
.ai-form { display: flex; gap: .45rem; padding: .65rem; border-top: 1px solid var(--border); background: var(--surface); }
.ai-form textarea { flex: 1; resize: none; border: 1px solid var(--border-strong); background: var(--page); color: var(--text); border-radius: 12px; padding: .55rem .7rem; font: inherit; font-size: .9rem; max-height: 110px; min-height: 42px; }
.ai-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.ai-form button { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; border: 0; background: #F86102; color: #080112; cursor: pointer; display: grid; place-items: center; }
.ai-form button[disabled] { opacity: .5; cursor: not-allowed; }
.ai-note { font-size: .68rem; color: var(--muted); text-align: center; padding: 0 .6rem .5rem; background: var(--surface); }
@media (max-width: 520px) {
  .ai-panel { inset-inline: 8px; width: auto; bottom: 84px; height: calc(100svh - 150px); }
  .ai-hint { display: none; }
}

/* ---------- 9. Reduced motion: show everything in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  .dxi-play .dxi-b, .dxi-draw .dxi-b, .dxs-sky i, .hd-mom, .grow-x .mark { transform: none !important; }
  .dxi-play .dxi-a, .dxi-draw .dxi-a, .hd-line, .sp-line { stroke-dashoffset: 0 !important; }
  .dxs-tile, .dxs-orbit, .dxs-tag, .dxw-play .dxw-l, .dxs-slogan, .dxs-slogan-ar, .dxs-cap, .dxs-cue,
  .hk, .sp-dot, .hd-prev, .hd-area, .hd-mk, .grow-x .val { opacity: 1 !important; }
  .sp-area { opacity: .14 !important; }
  .dxs-tile { scale: 1; }
  .dxs-inner { opacity: 1; transform: none; }
}
.ai-cta small { word-break: normal; }
.ai-eyes { transform-box: fill-box; transform-origin: center; animation: dxBlink 5s ease-in-out infinite; }
.ai-ant { animation: dxAnt 2.4s ease-in-out infinite; }
@keyframes dxBlink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes dxAnt { 0%, 100% { fill: #F86102; } 50% { fill: #FF9A55; } }
