/* Brain hero: the 3D graph behind the home headline. Loaded only by pages that use it. */
.hero--brain { --brain-lime: #D4FF27; --brain-night: #000413; }
.brain__canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; }
.brain__labels { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.brain-label { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity; opacity: 0;
  font-size: 10px; color: rgba(249,253,255,.72); margin: -6px 0 0 9px; text-shadow: 0 0 8px var(--brain-night), 0 0 2px var(--brain-night); }
.brain-label--agent { font: 700 12.5px/1 Archivo, Inter, sans-serif; font-stretch: 112%; color: #fff; margin: -9px 0 0 14px;
  padding: 5px 9px 5px 8px; border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); border-radius: 2px;
  background: color-mix(in srgb, var(--c) 14%, rgba(0,4,19,.78)); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 35%, transparent); }
.brain-label--agent::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c);
  margin-inline-end: 7px; vertical-align: 1px; box-shadow: 0 0 8px var(--c); }
.brain-label--tag { font: 600 12px/1 Inter, sans-serif; color: var(--brain-lime); padding: 4px 7px; margin: -9px 0 0 11px;
  border: 1px dashed rgba(212,255,39,.45); border-radius: 2px; background: rgba(0,4,19,.6); }
.brain-label--core { display: none; }
.brain-counter { position: absolute; left: 0; top: 0; text-align: center; font-family: Archivo, sans-serif; font-stretch: 112%;
  color: #bfe9ff; text-shadow: 0 0 14px rgba(120,200,255,.75), 0 0 3px rgba(0,4,19,.9); will-change: transform; }
.brain-counter::before { content: ""; position: absolute; inset: -34px -46px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,4,19,.82), rgba(0,4,19,.55) 60%, transparent); }
.brain-counter b { display: block; font: 800 9px/1 Inter, sans-serif; letter-spacing: .24em; color: var(--brain-lime);
  text-shadow: 0 0 12px rgba(212,255,39,.6); margin-bottom: 8px; }
.brain-counter dl { margin: 0; }
.brain-counter dt { font: 600 7.5px/1 Inter, sans-serif; letter-spacing: .22em; opacity: .75; margin-top: 5px; }
.brain-counter dd { margin: 1px 0 0; font-weight: 800; font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
/* The site's hero overlay darkens the whole section for text contrast; here it stops before the brain. */
.hero--brain::after { background: linear-gradient(90deg, rgba(0,14,43,.82) 0%, rgba(0,14,43,.4) 40%, rgba(0,14,43,0) 58%); }
:root[dir="rtl"] .hero--brain::after { background: linear-gradient(270deg, rgba(0,14,43,.82) 0%, rgba(0,14,43,.4) 40%, rgba(0,14,43,0) 58%); }
.brain-note { margin: 0; max-width: 520px; font-size: 14px; line-height: 1.6; color: var(--brain-lime); text-shadow: 0 0 12px var(--brain-night), 0 0 3px var(--brain-night); }

:root[dir="rtl"] .brain-label { margin: -6px 0 0 -9px; }
:root[dir="rtl"] .brain-label--agent { margin: -9px 0 0 -14px; }
:root[dir="rtl"] .brain-label--tag { margin: -9px 0 0 -11px; }
:root[lang="ar"] .brain-label, :root[lang="ar"] .brain-counter b, :root[lang="ar"] .brain-counter dt { font-family: Tajawal, sans-serif; letter-spacing: 0; }
:root[lang="ar"] .brain-label--agent { font-size: 14px; }
:root[lang="ar"] .brain-label--tag { font-size: 13.5px; }
:root[lang="ar"] .brain-counter b { font-size: 15px; }
:root[lang="ar"] .brain-counter dt { font-size: 10.5px; }

/* Below desktop width the brain gets its own band at the top and the text sits under it, so they never overlap. */
@media (max-width: 1100px) {
  .hero.hero--brain[data-hero-brain] { --brain-band: clamp(240px, 62vw, 460px); --brain-top: 12px; padding-top: calc(var(--brain-top) + var(--brain-band) + 20px); align-items: start; }
  .hero--brain::after, :root[dir="rtl"] .hero--brain::after { background: none; }
  .brain__canvas, .brain__labels { --brain-stacked: 1; inset: var(--brain-top) 0 auto 0; height: var(--brain-band); }
  .brain-label--agent { font-size: 10px; padding: 4px 6px; }
  :root[lang="ar"] .brain-label--agent { font-size: 11.5px; }
  .brain-counter dd { font-size: 16px; }
}
