/* Arabic display type needs extra vertical room for dots, hamzas, and descenders. */
html body,
html body :is(button,input,textarea,select) {
  font-family: 'Alexandria', sans-serif !important;
}

html[lang="ar"] :is(.hero-title, h1, .section-title, .sec-title, .cta-title, .cta h2, .page-title) {
  font-family: 'Alexandria', sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  overflow: visible;
}

html[lang="ar"] .hero-title,
html[lang="ar"] h1 {
  line-height: 1.38;
  padding-block: 0.08em 0.2em;
}

html[lang="ar"] :is(.section-title, .sec-title, .cta-title, .cta h2) {
  line-height: 1.48;
  padding-block: 0.08em 0.18em;
}

html[lang="ar"] :is(.hero-title .line-1, .hero-title .line-2) {
  display: block;
  width: fit-content;
  margin-inline: auto;
  padding: 0.06em 0.04em 0.22em;
  margin-bottom: -0.12em;
  overflow: visible;
}

html[lang="ar"] :is(
  .section-title .accent,
  .sec-title .g,
  .section-title .gradient,
  .division-hero h1 .gradient,
  .division-cta h2 .gradient,
  .cta-title .gradient-text,
  .cta h2 .gr
) {
  display: inline-block;
  padding: 0.06em 0.04em 0.22em;
  margin-bottom: -0.12em;
  overflow: visible;
}

/* Keep every footer visually consistent with the floating header card. */
footer,
.page-footer {
  width: calc(100% - 2rem);
  max-width: 1240px;
  margin: 0 auto 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  background: rgba(255,255,255,0.035);
  box-shadow: 0 18px 60px rgba(0,0,0,0.22);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

html.light :is(footer, .page-footer) {
  border-color: rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.62);
  box-shadow: 0 18px 50px rgba(25,20,35,0.08);
}

.footer-copy-404 {
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
}

html.light .footer-copy-404 {
  border-color: rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.7);
}

/* A complete light palette shared by the home, division, legal, and 404 pages. */
html.light {
  --black: #f6f3f8;
  --white: #201927;
  --glass-bg: rgba(255,255,255,0.72);
  --glass-border: rgba(55,37,69,0.13);
  --tag-color: rgba(43,32,52,0.68);
  --footer-text: rgba(32,25,39,0.76);
  --footer-text-dim: rgba(32,25,39,0.52);
  --light-ink: #201927;
  --light-muted: rgba(32,25,39,0.68);
  --light-soft: rgba(32,25,39,0.52);
  --light-surface: rgba(255,255,255,0.74);
  --light-border: rgba(55,37,69,0.13);
}

html.light body {
  color: var(--light-ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(102,0,204,0.07), transparent 32rem),
    radial-gradient(circle at 88% 28%, rgba(255,102,0,0.07), transparent 30rem),
    #f6f3f8;
}

html.light nav {
  color: var(--light-ink);
  background: rgba(255,255,255,0.84);
  border-color: var(--light-border);
  box-shadow: 0 14px 44px rgba(39,25,52,0.09);
}

html.light :is(
  .nav-logo, .nav-logo .logo-text, .nav-links a:hover,
  .hero-title, h1, .section-title, .sec-title,
  .card-title, .step-title, .cta-title, .cta h2,
  .page-title, .section h2, .work-title
) { color: var(--light-ink); }

html.light :is(
  .hero-sub, .card-text, .card-sub, .step-text, .stat-label,
  .cta p, .cta-sub, .page-meta, .section p, .section li,
  .hi-text, .work-cat
) { color: var(--light-muted); }

html.light :is(.hero-num, .card-number, .marquee-item) {
  color: var(--light-soft);
}

html.light :is(
  .service-card, .card, .step, .stat-card, .work-card,
  .cta-inner, .section, .highlight-box
) {
  background-color: var(--light-surface);
  border-color: var(--light-border);
  box-shadow: 0 16px 42px rgba(40,24,53,0.07);
}

html.light :is(.divider-sec, .marquee-wrap, .stats-section) {
  background-color: rgba(255,255,255,0.42);
  border-color: var(--light-border);
}

html.light :is(.nav-links a, .nav-back, .btn-g, .btn-ghost, .div-link) {
  color: var(--light-muted);
  border-color: rgba(55,37,69,0.2);
}

html.light :is(.nav-back, .btn-g, .btn-ghost, .div-link):hover {
  color: var(--light-ink);
  background: rgba(255,255,255,0.72);
  border-color: rgba(102,0,204,0.34);
}

html.light :is(.theme-btn, .lang-btn, .theme-btn-404, .lang-btn-404) {
  color: var(--light-ink);
  background: rgba(255,255,255,0.76);
  border-color: rgba(55,37,69,0.17);
  box-shadow: 0 5px 16px rgba(40,24,53,0.06);
}

html.light :is(.theme-btn, .lang-btn, .theme-btn-404, .lang-btn-404):hover {
  color: var(--light-ink);
  background: #fff;
  border-color: rgba(102,0,204,0.3);
}

/* White type is intentional only on saturated gradient calls to action. */
html.light :is(.btn-primary, .btn-p, .nav-cta, .section h2 span) {
  color: #fff;
}

html.light :is(.footer-copy, .foot-copy, .footer-copy-404) {
  color: var(--light-soft);
}

html.light :is(.footer-links a, .foot-links a) {
  color: var(--light-muted);
}

html.light :is(.footer-links a, .foot-links a):hover {
  color: var(--light-ink);
}

html.light .section h2,
html.light :is(.cookie-table th, .cookie-table td) {
  border-color: rgba(55,37,69,0.1);
}

html.light .cookie-table th { color: var(--light-soft); }
html.light .cookie-table td { color: var(--light-muted); }
html.light .highlight-box p { color: var(--light-ink) !important; }

html.light :is(footer, .page-footer) {
  color: var(--light-ink);
  border-color: var(--light-border);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 18px 50px rgba(40,24,53,0.09);
}

/* Keep the exact gap between the two hero actions on the page centerline. */
.hero-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(440px, calc(100% - 2rem));
  gap: 1rem;
}

.hero-buttons :is(.btn-primary, .btn-ghost) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-inline: 1rem;
  text-align: center;
  white-space: nowrap;
}

/* The division symbol itself is the 3D balloon object; it has no badge behind it. */
.card-icon.icon-art,
.hero-icon.icon-art {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.card-icon.icon-art {
  width: 76px;
  height: 76px;
  margin-bottom: 1.25rem;
}

.hero-icon.icon-art {
  width: 116px;
  height: 116px;
}

.icon-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(130, 20, 210, 0.28));
  transform: translateZ(0);
  transition: transform 260ms ease, filter 260ms ease;
}

.service-card:hover .icon-art img {
  transform: translateY(-4px) rotate(-2deg) scale(1.04);
  filter: drop-shadow(0 18px 28px rgba(255, 82, 74, 0.34));
}

html.light .icon-art img {
  filter: drop-shadow(0 13px 22px rgba(95, 35, 140, 0.2));
}

/* Service-card emoji keep their familiar colors; only their material becomes 3D balloon. */
.service-card .card-icon.service-icon-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.1rem;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.service-icon-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.28));
  transition: transform 240ms ease, filter 240ms ease;
}

.service-card:hover .service-icon-art img {
  transform: translateY(-3px) rotate(-2deg) scale(1.06);
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.34));
}

html.light .service-icon-art img {
  filter: drop-shadow(0 9px 14px rgba(35, 25, 45, 0.2));
}

.div-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.div-link-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.24));
}

@media (max-width: 700px) {
  html[lang="ar"] .hero-title,
  html[lang="ar"] h1 { line-height: 1.42; }
  html[lang="ar"] :is(.section-title, .sec-title, .cta-title, .cta h2) { line-height: 1.52; }
  footer,
  .page-footer { width: calc(100% - 1rem); border-radius: 22px; }
}

@media (max-width: 420px) {
  .hero-buttons :is(.btn-primary, .btn-ghost) {
    font-size: 11px;
    letter-spacing: 0.04em;
    padding-inline: 0.65rem;
  }
}

/* Complete responsive pass shared by the home, division, legal, and 404 pages. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto !important; }
  .cursor,
  .cursor-ring { display: none !important; }
  a,
  button { touch-action: manipulation; }
}

@media (max-width: 900px) {
  /* Homepage */
  body:not(.nm-has-shared-chrome) nav {
    top: 10px;
    width: calc(100% - 1rem);
    height: 106px;
    padding: 0.35rem 0.85rem 0.55rem;
    border-radius: 18px;
    flex-wrap: wrap;
    align-content: space-between;
    row-gap: 0;
  }

  body:not(.nm-has-shared-chrome) nav .nav-links {
    order: 3;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.25rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    direction: inherit;
    text-align: center;
  }

  body:not(.nm-has-shared-chrome) nav .nav-links a {
    display: block;
    padding: 0.25rem 0.15rem;
    font-size: 10px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  html.light body:not(.nm-has-shared-chrome) nav .nav-links {
    border-top-color: rgba(55,37,69,0.1);
  }

  body:not(.nm-has-shared-chrome) .nav-logo-text { display: none !important; }
  body:not(.nm-has-shared-chrome) nav > a img {
    width: 44px !important;
    height: 38px !important;
    object-fit: contain !important;
  }

  body:not(.nm-has-shared-chrome) .hero {
    min-height: auto;
    padding: 11.5rem 1.25rem 5rem;
  }

  body:not(.nm-has-shared-chrome) .section {
    padding: 5rem 1.25rem;
  }

  body:not(.nm-has-shared-chrome) .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.nm-has-shared-chrome) .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1rem;
  }

  body:not(.nm-has-shared-chrome) .work-grid {
    grid-template-columns: 1fr;
  }

  body:not(.nm-has-shared-chrome) footer > div > div:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2.5rem 2rem !important;
    padding-block: 3.5rem 2.5rem !important;
  }
}

@media (max-width: 700px) {
  /* Shared mobile header */
  .nm-site-nav {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    height: 108px;
    min-width: 0;
    padding: 0 0.7rem 8px;
    gap: 0 0.45rem;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 58px 40px;
    align-items: center;
  }

  .nm-site-nav__brand {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
  }

  .nm-site-nav__actions {
    min-width: 0;
    gap: 0.35rem;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .nm-site-nav__links {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0.2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    align-items: center;
  }

  .nm-site-nav__links li { min-width: 0; }

  .nm-site-nav__links a {
    display: block;
    padding: 0.15rem 0.1rem;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-align: center;
  }

  html.light .nm-site-nav__links {
    border-top-color: rgba(55,37,69,0.1);
  }

  .nm-site-nav__actions :is(.theme-btn, .lang-btn, .theme-btn-404, .lang-btn-404) {
    min-width: 36px;
    height: 36px;
    padding-inline: 0.55rem;
  }

  .nm-site-nav__cta {
    height: 36px;
    padding-inline: 0.65rem;
    font-size: 10px;
    white-space: nowrap;
  }

  /* Homepage mobile layout */
  body:not(.nm-has-shared-chrome) nav .nav-cta {
    padding: 9px 12px;
    font-size: 10px;
    white-space: nowrap;
  }

  body:not(.nm-has-shared-chrome) nav :is(.lang-btn, .theme-btn) {
    min-width: 36px;
    height: 36px;
    padding-inline: 0.55rem;
  }

  body:not(.nm-has-shared-chrome) .hero-title {
    max-width: 100%;
    font-size: clamp(2.65rem, 15vw, 5.5rem);
    line-height: 1.08;
  }

  html[lang="ar"] body:not(.nm-has-shared-chrome) .hero-title {
    line-height: 1.35;
  }

  body:not(.nm-has-shared-chrome) .hero-sub {
    max-width: 34rem;
    font-size: 0.95rem;
    line-height: 1.85;
  }

  body:not(.nm-has-shared-chrome) .hero-buttons {
    grid-template-columns: 1fr;
    width: min(100%, 360px);
  }

  body:not(.nm-has-shared-chrome) .scroll-hint { display: none; }
  body:not(.nm-has-shared-chrome) .marquee-item { font-size: 10px; }
  body:not(.nm-has-shared-chrome) .section-title {
    font-size: clamp(2rem, 10vw, 3.25rem);
    margin-bottom: 2.5rem;
  }

  body:not(.nm-has-shared-chrome) .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body:not(.nm-has-shared-chrome) .service-card {
    min-height: 0;
    padding: 1.5rem;
  }

  body:not(.nm-has-shared-chrome) :is(.stats-section, .cta-section) {
    padding: 4.5rem 1rem;
  }

  body:not(.nm-has-shared-chrome) .work-card-inner {
    min-height: 270px;
    padding: 1.5rem;
  }

  body:not(.nm-has-shared-chrome) .cta-inner {
    padding: 3rem 1.25rem;
    border-radius: 22px;
  }

  body:not(.nm-has-shared-chrome) .cta-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  body:not(.nm-has-shared-chrome) footer > div {
    padding-inline: 1rem !important;
  }

  body:not(.nm-has-shared-chrome) footer > div > div:first-child {
    grid-template-columns: 1fr !important;
  }

  /* Division pages */
  body.nm-has-shared-chrome .hero {
    min-height: auto;
    padding: 11.5rem 1rem 4.5rem;
  }

  body.nm-has-shared-chrome .hero .badge {
    max-width: 100%;
    padding: 7px 14px;
    font-size: 9px;
    line-height: 1.6;
    letter-spacing: 0.12em;
    white-space: normal;
    text-align: center;
  }

  body.nm-has-shared-chrome .hero h1 {
    font-size: clamp(2.65rem, 16vw, 5.5rem);
    overflow-wrap: anywhere;
  }

  body.nm-has-shared-chrome .hero-sub {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.8;
  }

  body.nm-has-shared-chrome .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  body.nm-has-shared-chrome .hero-actions :is(.btn-p, .btn-g) {
    width: min(100%, 330px);
    justify-content: center;
    padding-inline: 1rem;
    text-align: center;
  }

  body.nm-has-shared-chrome :is(.sec, .stats-wrap) {
    padding: 4.5rem 1rem;
  }

  body.nm-has-shared-chrome .divider-sec {
    padding: 4.5rem 1rem;
  }

  body.nm-has-shared-chrome .sec-title {
    margin-bottom: 2.5rem;
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  body.nm-has-shared-chrome .card {
    padding: 1.5rem;
    border-radius: 18px;
  }

  body.nm-has-shared-chrome .grid-4 {
    gap: 2rem 1rem;
  }

  body.nm-has-shared-chrome .divs-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 3rem;
    padding-top: 3rem;
  }

  body.nm-has-shared-chrome .div-link {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
  }

  body.nm-has-shared-chrome .cta {
    padding: 5rem 1rem;
  }

  body.nm-has-shared-chrome .cta h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  /* Legal pages */
  body.nm-has-shared-chrome .page-hero {
    padding: 11.5rem 1rem 3rem;
  }

  body.nm-has-shared-chrome .page-title {
    font-size: clamp(2rem, 10vw, 3rem);
    overflow-wrap: anywhere;
  }

  body.nm-has-shared-chrome .content {
    width: 100%;
    padding: 2rem 0.75rem 4rem;
  }

  body.nm-has-shared-chrome .content .section {
    margin-bottom: 1rem;
    padding: 1.35rem 1.1rem;
    border-radius: 15px;
  }

  body.nm-has-shared-chrome .content :is(p, li) {
    overflow-wrap: anywhere;
  }

  .cookie-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cookie-table :is(th, td) {
    min-width: 145px;
    padding: 0.75rem;
  }

  /* Shared footer */
  .nm-site-footer {
    margin-top: 3.5rem;
    padding: 2.5rem 1.25rem 1.25rem;
  }

  .nm-site-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nm-site-footer__bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .nm-site-footer__legal {
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
  }

  body.nm-404-page {
    justify-content: flex-start;
    padding: 10rem 1rem 1rem;
  }

  body.nm-404-page .num {
    font-size: clamp(80px, 30vw, 130px);
  }
}

@media (max-width: 430px) {
  .nm-site-nav__brand img {
    width: 42px;
    height: 28px;
  }

  body:not(.nm-has-shared-chrome) nav {
    height: 102px;
  }

  .nm-site-nav {
    height: 60px;
    grid-template-rows: 1fr;
  }

  .nm-site-nav__links a,
  body:not(.nm-has-shared-chrome) nav .nav-links a {
    font-size: 9px;
    letter-spacing: 0;
  }

  .nm-site-nav__actions :is(.theme-btn, .lang-btn, .theme-btn-404, .lang-btn-404) {
    min-width: 32px;
    width: 32px;
    padding: 0;
    font-size: 10px;
  }

  .nm-site-nav__cta {
    max-width: 96px;
    padding-inline: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.nm-has-shared-chrome) nav {
    padding-inline: 0.55rem;
  }

  body:not(.nm-has-shared-chrome) nav > a img {
    width: 36px !important;
    height: 32px !important;
  }

  body:not(.nm-has-shared-chrome) .nav-cta {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.nm-has-shared-chrome) .hero {
    padding-inline: 0.85rem;
  }

  body:not(.nm-has-shared-chrome) .hero-eyebrow {
    font-size: 9px;
    letter-spacing: 0.13em;
  }

  body:not(.nm-has-shared-chrome) .stats-grid {
    gap: 1.5rem 0.75rem;
  }

  body:not(.nm-has-shared-chrome) .stat-num {
    font-size: 2.3rem;
  }

  body.nm-has-shared-chrome .grid-4,
  body.nm-has-shared-chrome .divs-nav {
    grid-template-columns: 1fr;
  }

  body.nm-has-shared-chrome .stat-card {
    padding: 2rem 1rem;
  }

  .nm-site-footer__legal {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
  }
}

/* Mobile chrome: keep navigation readable instead of collapsing it into one cramped row. */
.nm-site-nav__links a,
.nm-site-nav__cta,
body:not(.nm-has-shared-chrome) :is(.nav-links a,.nav-cta) {
  font-weight: 800;
}

@media (max-width: 700px) {
  .nm-site-nav {
    top: 8px;
    height: 112px;
    padding: 0 .75rem 8px;
    grid-template-columns: auto minmax(0,1fr);
    grid-template-rows: 61px 42px;
    gap: 0 .55rem;
  }

  .nm-site-nav__brand img { width: 48px; height: 34px; }
  .nm-site-nav__actions { width: 100%; justify-content: flex-end; gap: .4rem; }
  html[dir="rtl"] .nm-site-nav__actions { justify-self: start; }
  .nm-site-nav__links { padding-inline: 2px; gap: .25rem; }
  .nm-site-nav__links a { font-size: 10.5px; line-height: 1.25; }
  .nm-site-nav__cta { min-width: 108px; height: 39px; padding-inline: .75rem; font-size: 10.5px; }
  .nm-site-nav__actions :is(.theme-btn,.lang-btn,.theme-btn-404,.lang-btn-404) { height: 36px; }
  body.nm-has-shared-chrome .nm-showcase { padding-top: 145px !important; }
}

@media (max-width: 430px) {
  .nm-site-nav {
    height: 108px;
    grid-template-rows: 58px 41px;
  }

  .nm-site-nav__brand img { width: 44px; height: 31px; }
  .nm-site-nav__links a { font-size: 9.5px; }
  .nm-site-nav__actions :is(.theme-btn,.lang-btn,.theme-btn-404,.lang-btn-404) {
    min-width: 34px;
    width: 34px;
  }
  .nm-site-nav__cta {
    max-width: none;
    min-width: 104px;
    padding-inline: .55rem;
    overflow: visible;
    text-overflow: clip;
  }
}
