/* ============================================================
   Hackify — Landing Page V2.0
   Brand: Hackify Product Identity — Innovation Spectrum
   Ignition #F26722 · Momentum #FF7A1A · Acceleration #FAA541 · Impact #FFD166
   Editorial redesign: poster typography, index lists, bento
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand — the Innovation Spectrum */
  --brand: #f26722;       /* Ignition     — primary   */
  --brand-600: #ff7a1a;   /* Momentum     — secondary */
  --brand-500: #ffa63d;   /* Acceleration — accent    */
  --accent: #ffd166;      /* Impact       — accent    */
  --brand-100: #ffe8a3;
  --brand-1: #ffdfbb;
  --brand-05: #fff4e3;
  --brand-0: #fffcf6;
  /* Neutrals — the calm behind innovation */
  --black-5: #232426;
  --black-45: #2e2f31;
  --black-4: #313234;
  --black-3: #4a4a4b;
  --black-2: #68686a;
  --black-0: #8e8e90;
  --gray-5: #f4f4f4;
  --gray-7: #e2e2e2;
  --gray-10: #d0d0d0;
  --neutral-50: #b0b0b1;
  --white: #ffffff;

  /* Type */
  --font-latin: "IBM Plex Sans", -apple-system, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  --font-kufi: "Noto Kufi Arabic", sans-serif;

  /* Motion — one easing language */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.65, 0.05, 0, 1);
  --theme-fade: 640ms;

  /* Layout */
  --container: 1248px;
  --nav-h: 104px;

  /* Direction-aware shift for hover follow-through */
  --shift: 14px;

  /* Light theme (default) */
  --bg: #ffffff;
  --bg-soft: #fffcf6;
  --text: #313234;
  --text-2: #68686a;
  --text-3: #8e8e90;
  --card-bg: #ffffff;
  --card-border: #ffdfbb;
  --cluster-bg: #fff4e3;
  --chip-bg: rgba(255, 255, 255, 0.7);
  --chip-text: #68686a;
  --tag-bg: #fffcf6;
  --tag-border: #ffdfbb;
  --faq-border: #e2e2e2;
  --blob: #ffdfbb;
  --blob-opacity: 0.55;
  --hero-glow: rgba(242, 103, 34, 0.14);
  --stat-num: #f26722;
  --nav-blur-bg: rgba(255, 255, 255, 0.72);
  --icon-stroke: #313234;
  --icon-glow: #f26722;
  --logo-fill: #313234;
  --shadow-card: 0 4px 48px rgba(35, 36, 38, 0.08);
  --browser-bar: #ffffff;
  --browser-address: #f4f4f4;
  --browser-pill: #d0d0d0;
  --rule: rgba(49, 50, 52, 0.12);
  --num-ink: rgba(242, 103, 34, 0.28);
  --band-bg: #fff4e3;
}

[data-theme="dark"] {
  --bg: #232426;
  --bg-soft: #2e2f31;
  --text: #f4f4f4;
  --text-2: #d0d0d0;
  --text-3: #8e8e90;
  --card-bg: #2e2f31;
  --card-border: #3d3f41;
  --cluster-bg: #1c1d1f;
  --chip-bg: #3d3f41;
  --chip-text: #d0d0d0;
  --tag-bg: rgba(242, 103, 34, 0.14);
  --tag-border: rgba(242, 103, 34, 0.45);
  --faq-border: #3d3f41;
  --blob: #f26722;
  --blob-opacity: 0.16;
  --hero-glow: rgba(242, 103, 34, 0.28);
  --stat-num: #ffffff;
  --nav-blur-bg: rgba(35, 36, 38, 0.72);
  --icon-stroke: #f4f4f4;
  --icon-glow: #ffa63d;
  --logo-fill: #ffffff;
  --shadow-card: 0 4px 48px rgba(0, 0, 0, 0.4);
  --browser-bar: #2e2f31;
  --browser-address: #3d3f41;
  --browser-pill: #4a4a4b;
  --rule: rgba(244, 244, 244, 0.14);
  --num-ink: rgba(255, 166, 61, 0.38);
  --band-bg: #1c1d1f;
}

html[dir="rtl"] { --shift: -14px; --sdir: 270deg; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-latin);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="ar"] body { font-family: var(--font-arabic); }

body.theme-anim,
body.theme-anim * {
  transition:
    background-color var(--theme-fade) var(--ease-out),
    border-color var(--theme-fade) var(--ease-out),
    color var(--theme-fade) var(--ease-out),
    fill var(--theme-fade) var(--ease-out),
    stroke var(--theme-fade) var(--ease-out),
    box-shadow var(--theme-fade) var(--ease-out) !important;
}

/* Theme switch theatre — circular wipe via View Transitions */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }

::selection { background: var(--brand); color: #fff; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.preloader__panel { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--bg); }
.preloader__panel--top { top: 0; }
.preloader__panel--bottom { bottom: 0; }
.preloader__content {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.preloader__logo { width: 200px; overflow: hidden; }
.preloader__logo svg { width: 100%; height: auto; }
.preloader__bar {
  width: 190px; height: 2px; border-radius: 2px;
  background: color-mix(in srgb, var(--text) 12%, transparent);
  overflow: hidden;
}
.preloader__bar i {
  display: block; height: 100%; width: 100%;
  background: var(--brand);
  transform: scaleX(0); transform-origin: left center;
}
html[dir="rtl"] .preloader__bar i { transform-origin: right center; }
.preloader__pct {
  font-size: 13px; letter-spacing: .14em; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.preloader__pct::after { content: "%"; }

/* ---------- Language switch curtain ---------- */
.langwipe { position: fixed; inset: 0; z-index: 998; visibility: hidden; pointer-events: none; }
.langwipe i { position: absolute; inset: 0; display: block; will-change: transform; }
.langwipe i:nth-child(1) { background: var(--brand); }
.langwipe i:nth-child(2) { background: var(--accent); }
.langwipe i:nth-child(3) { background: var(--bg); }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 1000;
  border-radius: 50%; pointer-events: none;
  will-change: transform;
}
.cursor-dot {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: var(--brand);
}
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid color-mix(in srgb, var(--brand) 65%, transparent);
  transition: opacity .3s;
}
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 1001;
  pointer-events: none; will-change: transform;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 48px;
  transform-origin: center;
  opacity: 0;
}
html[lang="ar"] .cursor-label { letter-spacing: 0; }
body.cursor-on * { cursor: none !important; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring, .cursor-label { display: none; }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  pointer-events: none;
}
.scroll-progress i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(var(--sdir, 90deg), #f26722, #ff7a1a, #faa541, #ffd166);
  transform: scaleX(0); transform-origin: left center;
}
html[dir="rtl"] .scroll-progress i { transform-origin: right center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  /* Safari perf: never transition backdrop-filter — animating the blur
     radius forces a full backdrop re-filter per frame. The bg-color fade
     covers the reveal; the blur snaps in unnoticed behind it. */
  transition: background-color .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px 88px 26px;
  transition: padding .45s var(--ease-out);
}
.nav.is-stuck {
  background: var(--nav-blur-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 var(--rule);
}
.nav.is-stuck .nav__inner { padding-block: 14px 12px; }

/* Hackify lockup: the mark keeps its brand oranges; the HACKIFY wordmark
   follows --logo-fill (ink in light mode, white in dark). The lockup is a
   brand asset, so it is never mirrored in Arabic. */
.logo { display: flex; align-items: center; }
.logo__mark { display: block; height: 40px; }
.logo__mark svg { display: block; height: 100%; width: auto; }
.nav.is-stuck .logo__mark { height: 34px; }
.logo__mark { transition: height .45s var(--ease-out); }

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__link { position: relative; font-size: 16px; line-height: 24px; padding-block: 4px; }
.nav__link::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  border-radius: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: var(--underline-origin, left) center;
  transition: transform .35s var(--ease-out);
}
html[dir="rtl"] .nav__link::after { --underline-origin: right; }
.nav__link:hover::after, .nav__link:focus-visible::after { transform: scaleX(1); }

.nav__actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  color: var(--text);
  transition: border-color .3s, background-color .3s, transform .3s var(--ease-out);
}
.icon-btn:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.icon-btn svg { width: 19px; height: 19px; }
.lang-btn { width: auto; padding-inline: 14px; border-radius: 40px; font-weight: 600; font-size: 14px; letter-spacing: .4px; }

/* Hamburger — glyph crossfades to an X when open */
.menu-btn { border: 0; width: 32px; height: 32px; display: none; position: relative; }
.menu-btn__glyph { display: block; width: 100%; height: 100%; transition: opacity .35s, transform .45s var(--ease-out); }
.menu-btn__glyph svg { width: 100%; height: 100%; }
.menu-btn__x { position: absolute; inset: 0; opacity: 0; transform: rotate(-90deg) scale(.4); transition: opacity .35s, transform .45s var(--ease-out); }
.menu-btn__x i {
  position: absolute; top: 50%; left: 50%; width: 22px; height: 2px; border-radius: 2px;
  background: currentColor;
}
.menu-btn__x i:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.menu-btn__x i:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }
.menu-btn.open .menu-btn__glyph { opacity: 0; transform: rotate(90deg) scale(.4); }
.menu-btn.open .menu-btn__x { opacity: 1; transform: rotate(0) scale(1); }

/* theme icon crossfade */
.icon-btn .sun, .icon-btn .moon { grid-area: 1 / 1; transition: opacity .4s, transform .5s var(--ease-out); }
/* Toggle shows the destination: moon while in light mode, sun while in dark */
[data-theme="light"] .icon-btn .sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] .icon-btn .moon { opacity: 0; transform: rotate(90deg) scale(.5); }

/* ---------- Mobile menu overlay ---------- */
.menu-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: var(--bg);
  visibility: hidden; /* transform is JS-owned (GSAP yPercent) */
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 8px) 28px 40px;
  will-change: transform;
}
.menu-overlay__links { display: flex; flex-direction: column; }
.menu-overlay__link {
  display: flex; align-items: baseline; gap: 18px;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-kufi);
  font-size: clamp(30px, 8.5vw, 52px); font-weight: 500; line-height: 1.4;
  transition: color .3s;
}
html[lang="ar"] .menu-overlay__link { font-family: var(--font-arabic); font-weight: 600; }
.menu-overlay__link:active, .menu-overlay__link:hover { color: var(--brand); }
.menu-overlay__num {
  font-family: var(--font-latin);
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  color: var(--text-3); direction: ltr;
}
.menu-overlay__foot { margin-top: 40px; font-size: 13px; color: var(--text-2); }

/* ---------- Decorative blobs (scroll-reactive) ----------
   Safari perf: pre-softened radial gradient instead of filter: blur(140px).
   A blurred solid circle = flat core + smooth falloff, which the gradient
   reproduces with zero per-frame filter cost. */
.blob {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle closest-side,
    var(--blob) 0%, var(--blob) 38%,
    color-mix(in srgb, var(--blob) 62%, transparent) 58%,
    color-mix(in srgb, var(--blob) 24%, transparent) 76%,
    transparent 96%);
  opacity: var(--blob-opacity);
  pointer-events: none; will-change: transform;
  transform: translateZ(0);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: calc(var(--nav-h) + 72px); overflow: clip; }
.hero__brandmark {
  position: absolute; z-index: 0; pointer-events: none;
  top: clamp(30px, 6vw, 90px); inset-inline-end: clamp(-150px, -5vw, -50px);
  width: clamp(380px, 40vw, 640px); opacity: .05;
}
.hero__brandmark svg { width: 100%; height: auto; display: block; }
html[dir="rtl"] .hero__brandmark svg { transform: scaleX(-1); }
[data-theme="dark"] .hero__brandmark { opacity: .075; }
.hero__glow {
  position: absolute; top: -22%; left: 50%; margin-left: -550px;
  width: 1100px; height: 1100px; border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 62%);
  pointer-events: none; will-change: transform;
}
.hero__content { position: relative; }
.hero__title {
  font-size: clamp(42px, 7.2vw, 100px);
  line-height: 1.04; font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 14em;
}
html[lang="ar"] .hero__title { line-height: 1.28; letter-spacing: 0; font-size: clamp(38px, 6.4vw, 88px); }
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero__title .w > i { display: inline-block; font-style: normal; will-change: transform; }
.hero__title .w--accent > i { font-family: var(--font-kufi); color: var(--brand); font-weight: 700; }
html[lang="ar"] .hero__title .w--accent > i { font-family: var(--font-arabic); }

.hero__row {
  margin-top: 44px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.hero__sub { font-size: clamp(15px, 2vw, 18px); line-height: 1.6; color: var(--text-2); max-width: 560px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 24px; border-radius: 64px;
  font-weight: 600; font-size: 16px; line-height: 22px;
  overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out),
              background-color .3s, border-color .3s;
  will-change: transform;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.28) 50%, transparent 68%);
  transform: translateX(-130%) skewX(-8deg);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(130%) skewX(-8deg); transition: transform .75s var(--ease-out); }
html[dir="rtl"] .btn::after { transform: translateX(130%) skewX(-8deg); }
html[dir="rtl"] .btn:hover::after { transform: translateX(-130%) skewX(-8deg); }
.btn:active { transform: scale(.97); }
.btn--primary {
  /* The Innovation Spectrum, in stage order: Ignition → Momentum → Acceleration → Impact */
  background: linear-gradient(var(--sdir, 90deg), #f26722 0%, #ff7a1a 45%, #faa541 85%, #ffd166 100%);
  color: var(--gray-5);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(242, 103, 34, .35); }
.btn--ghost {
  background: var(--black-4); color: #fff;
  border: 1px solid var(--black-3); border-radius: 88px;
}
.btn--ghost:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, .25); }
.btn--yellow { background: var(--accent); color: var(--black-5); }
.btn--yellow:hover { box-shadow: 0 12px 32px rgba(255, 209, 102, .45); }
.btn__arrow { width: 24px; height: 24px; transition: transform .35s var(--ease-out); }
html[dir="rtl"] .btn__arrow { transform: scaleX(-1); }
.btn:hover .btn__arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .btn__arrow { transform: scaleX(-1) translateX(4px); }

/* Browser mockup — scroll-linked scene straightens it */
.hero__mock { position: relative; max-width: 1088px; margin: 88px auto 0; perspective: 1200px; }
.browser {
  position: relative; border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-card), 0 30px 90px rgba(34, 37, 44, .14);
  background: var(--browser-bar);
  will-change: transform;
}
.browser__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px; padding-inline: 24px;
  background: var(--browser-bar);
  border-bottom: 1px solid var(--rule);
  direction: ltr;
}
.browser__dots { display: flex; gap: 8px; }
.browser__dots i { width: 12px; height: 12px; border-radius: 50%; }
.browser__dots i:nth-child(1) { background: #ed6a5e; }
.browser__dots i:nth-child(2) { background: #f4bf4f; }
.browser__dots i:nth-child(3) { background: #61c554; }
.browser__address {
  flex: 0 1 480px; height: 28px; border-radius: 8px;
  background: var(--browser-address);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.browser__address svg { width: 13px; height: 13px; color: var(--text-3); }
.browser__address i { width: 108px; height: 8px; border-radius: 48px; background: var(--browser-pill); }
.browser__side { display: flex; gap: 14px; color: var(--text-3); }
.browser__side svg { width: 17px; height: 17px; }
.browser__view { position: relative; aspect-ratio: 1024 / 556; overflow: hidden; }
.browser__view img {
  position: absolute; inset: 0; width: 100%; height: auto; object-fit: cover; object-position: top;
}
.browser__fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom,
    transparent 0%, color-mix(in srgb, var(--bg) 10%, transparent) 55%,
    color-mix(in srgb, var(--bg) 50%, transparent) 73%, color-mix(in srgb, var(--bg) 85%, transparent) 100%);
}

/* Stats — numbers as graphic elements */
.stats {
  margin-top: 88px; padding-block: 56px 72px;
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.stat { padding-inline: 16px; text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--rule); }
.stat__num {
  font-size: clamp(38px, 4.8vw, 68px); line-height: 1; font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--stat-num); direction: ltr; font-variant-numeric: tabular-nums;
  text-align: center;
}
.stat__label { margin-top: 14px; font-size: 15px; letter-spacing: .02em; color: var(--text-2); }

/* ---------- Marquee ribbon ----------
   Safari perf: edge fades are gradient overlays instead of mask-image —
   masking an infinitely-animating group forces Safari to re-composite the
   masked layer every frame. The page behind is a solid var(--bg), so
   overlays are visually identical. */
.marquee {
  position: relative;
  overflow: hidden; padding-block: 64px 16px;
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 12%;
  z-index: 1; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.marquee__track {
  display: flex; align-items: center; gap: 40px;
  width: max-content;
  will-change: transform;
}
/* Outlined words: the stroke is painted *under* a background-coloured fill
   (paint-order), so only the outer half shows. That gives the thicker ~4px
   outline asked for while hiding the internal contour lines where Arabic
   letters join — a centred stroke on a transparent fill draws those joins as
   little cut lines. The stroke colour is opaque so overlaps never darken. */
.marquee__item {
  font-family: var(--font-kufi);
  font-size: clamp(34px, 4.6vw, 58px); font-weight: 700; line-height: 1.6;
  white-space: nowrap;
  color: var(--bg);
  -webkit-text-stroke: .135em color-mix(in srgb, var(--text) 42%, var(--bg));  /* ≈4px visible at desktop size, scales down on phones */
  paint-order: stroke fill;
}
html[lang="ar"] .marquee__item { font-family: var(--font-arabic); }
.marquee__item--fill { color: var(--brand); -webkit-text-stroke: 0; }
.marquee__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: 110px; overflow: clip; }

.section__label {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 30px;
}
.section__label::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.section__label span {
  font-family: var(--font-kufi);
  font-size: 17px; font-weight: 700; letter-spacing: .06em;
  color: var(--text); font-variant-numeric: tabular-nums; direction: ltr;
}
.section__label i { flex: 1; height: 1px; background: var(--rule); transform-origin: left center; }
html[dir="rtl"] .section__label i { transform-origin: right center; }

.section__head--split {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px 64px;
  align-items: end;
}
.section__head--split .section__label { grid-column: 1 / -1; margin-bottom: 8px; }
.section__title {
  font-size: clamp(30px, 3.8vw, 48px); line-height: 1.1; font-weight: 500;
  letter-spacing: -0.015em;
}
html[lang="ar"] .section__title { line-height: 1.3; letter-spacing: 0; }
.section__sub {
  font-size: clamp(15px, 2vw, 17px); line-height: 1.6; color: var(--text-2);
  max-width: 420px; justify-self: end; align-self: end;
}
html[dir="rtl"] .section__sub { justify-self: start; }
html[dir="rtl"] .section__head--split .section__sub { justify-self: end; }

/* ---------- Features: typographic index ---------- */
.findex {
  margin-top: 72px; border-top: 1px solid var(--faq-border);
  --gutter: clamp(44px, 6vw, 78px);   /* number column — body copy aligns to it */
  --bleed: clamp(16px, 2.5vw, 36px);  /* purple band extends past the container */
}
.frow { position: relative; border-bottom: 1px solid var(--faq-border); }
.frow::before {
  content: ""; position: absolute; inset: 0 calc(-1 * var(--bleed)); z-index: 0;
  background: linear-gradient(var(--sdir, 90deg), #f26722 0%, #ff7a1a 45%, #faa541 85%, #ffd166 100%);
  transform: scaleY(0); transform-origin: center bottom;
  transition: transform .5s var(--ease-soft);
}
.frow.active::before { transform: scaleY(1); }
.frow__h { margin: 0; position: relative; z-index: 1; }
.frow__head {
  width: 100%;
  display: grid; grid-template-columns: var(--gutter) 1fr auto; align-items: center; gap: 24px;
  padding-block: clamp(20px, 2.6vw, 30px);
  text-align: start;
}
.frow__num {
  font-size: 14px; font-weight: 600; letter-spacing: .14em;
  color: var(--text-3); font-variant-numeric: tabular-nums; direction: ltr;
  transition: color .4s var(--ease-out);
}
.frow__title {
  font-size: clamp(22px, 2.6vw, 36px); line-height: 1.2; font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .4s var(--ease-out), transform .55s var(--ease-out);
}
html[lang="ar"] .frow__title { line-height: 1.4; letter-spacing: 0; }
.frow__icon {
  width: 32px; height: 32px; color: var(--text-3);
  transition: color .4s var(--ease-out), transform .55s var(--ease-out);
}
.frow__icon svg { width: 100%; height: 100%; }
.frow__body { position: relative; z-index: 1; height: 0; overflow: hidden; }
.frow__body p {
  margin-inline-start: calc(var(--gutter) + 24px); /* align with the title column */
  padding-bottom: clamp(26px, 3vw, 40px);
  font-size: clamp(15px, 1.8vw, 18px); line-height: 1.65;
  max-width: 640px; color: var(--text-2);
  transition: color .4s var(--ease-out);
}
/* purple treatment only while hovered / active */
.frow.active .frow__title { color: #fff; transform: translateX(var(--shift)); }
.frow.active .frow__num { color: rgba(255, 255, 255, .7); }
.frow.active .frow__icon { color: #313234; transform: scale(1.1) rotate(-5deg); }
.frow.active .frow__body p { color: rgba(255, 255, 255, .88); }

/* ---------- Sectors: interactive index list ---------- */
.sectors {
  background: var(--band-bg);
  border-radius: clamp(28px, 4vw, 56px);
  margin-inline: clamp(8px, 1vw, 16px);
  padding-block: 110px 96px;
}
/* Sectors carousel: full-bleed auto-advancing photo cards. Track motion is
   JS-owned (translate3d only); card emphasis is a CSS class toggle. */
.scarousel { margin-top: 56px; position: relative; }
.scarousel:focus-visible { outline: 2px solid var(--brand); outline-offset: 8px; border-radius: 12px; }
.scarousel__viewport {
  overflow: hidden;
  padding-block: 10px;
  /* first card aligns with the .container edge, cards bleed off the other side */
  padding-inline: max(24px, calc((100% - var(--container)) / 2));
  touch-action: pan-y;
}
.scarousel--on .scarousel__viewport {
  cursor: grab;
  user-select: none; -webkit-user-select: none;
}
.scarousel.is-dragging .scarousel__viewport { cursor: grabbing; }
.scarousel__track {
  display: flex; gap: clamp(14px, 1.8vw, 22px);
  width: max-content;
  will-change: transform;
}
/* no-JS / reduced-motion fallback: a calm wrapped grid, no autoplay chrome */
.scarousel:not(.scarousel--on) .scarousel__track {
  width: 100%; flex-wrap: wrap; justify-content: center;
  transform: none !important;
}
.scarousel:not(.scarousel--on) .scard { width: clamp(240px, 44%, 400px); }
.scarousel:not(.scarousel--on) .scard__progress { display: none; }

.scard {
  position: relative; flex: none;
  width: clamp(260px, 33vw, 420px);
  aspect-ratio: 4 / 5;
  border-radius: clamp(18px, 2vw, 26px);
  overflow: hidden;
  background: var(--bg-soft);
  transform: translateZ(0);
}
.scarousel--on .scard {
  opacity: .5; transform: scale(.94);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.scarousel--on .scard.is-active { opacity: 1; transform: scale(1); }
.scard img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.8);
  transform: scale(1.01);
  transition: transform .8s var(--ease-out), filter .55s var(--ease-out);
}
.scarousel--on .scard.is-active img, .scard:hover img { filter: none; }
.scard:hover img { transform: scale(1.05); }
.scard__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top,
    rgba(21, 17, 27, .78) 0%, rgba(21, 17, 27, .32) 40%, transparent 68%);
}
.scard__meta {
  position: absolute; inset-inline: 22px; bottom: 20px;
  display: flex; align-items: baseline; gap: 14px;
  color: #fff;
}
.scard__num {
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  color: rgba(255, 255, 255, .62);
  font-variant-numeric: tabular-nums; direction: ltr;
  transition: color .4s var(--ease-out);
}
.scard__name {
  font-family: var(--font-kufi);
  font-size: clamp(20px, 2.1vw, 29px); line-height: 1.35; font-weight: 500;
}
html[lang="ar"] .scard__name { font-family: var(--font-arabic); font-weight: 600; }
/* purple lives only on hover / the active card — the progress fill below
   plus the numeral accent; nothing purple sits static */
.scard:hover .scard__num, .scarousel--on .scard.is-active .scard__num { color: #ffc48a; }
.scard__progress {
  position: absolute; inset-inline: 0; bottom: 0; height: 4px;
  background: rgba(255, 255, 255, .22);
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.scarousel--on .scard.is-active .scard__progress { opacity: 1; }
.scard__progress i {
  display: block; height: 100%; width: 100%;
  background: var(--brand);
  transform: scaleX(0); transform-origin: left center;
}
html[dir="rtl"] .scard__progress i { transform-origin: right center; }

/* ---------- Flexible / modules ---------- */
/* Cluster cards: chips + live skeleton preview of the admin app */
.clusters { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cluster {
  background: var(--cluster-bg);
  border-radius: 16px; padding: 24px 24px 22px;
  border: 1px solid var(--card-border);
  display: flex; flex-direction: column; gap: 18px;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s;
}
.cluster:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(242, 103, 34, .35); }
.cluster__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cluster__title { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.3; font-weight: 600; }

/* mac traffic-light dots on the card header */
.trio { display: flex; gap: 8px; }
.trio i { width: 12px; height: 12px; border-radius: 50%; }
.trio i:nth-child(1) { background: #ed6a5e; }
.trio i:nth-child(2) { background: #f4bf4f; }
.trio i:nth-child(3) { background: #61c554; }

.cluster__body {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 18px; align-items: center;
}
/* chips: one tidy, flush-aligned column */
.cluster__chips { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--chip-bg); color: var(--chip-text);
  border-radius: 999px; padding: 8px 14px;
  font-size: 13px; line-height: 1.4; font-weight: 500;
  box-shadow: 0 2px 6px rgba(23, 23, 28, .05);
  max-width: 100%;
  /* no transform transition: GSAP owns chip transforms (pop-in animation) */
  transition: background-color .3s;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; order: -1; }

/* ---------- Cluster preview windows: admin-app skeletons ---------- */
:root {
  --a-bg: #f6f6f7; --a-side: #ffffff; --a-line: #ededee;
  --a-card: #ffffff; --a-card-bd: #e8e8ea;
  --a-input: #fafafa; --a-input-bd: #e2e2e2;
  --a-green: #6d9c60; --a-green-lt: #8fb885; --a-amber: #d9a300; --a-red: #cc0000;
  --a-pink: #f26722; --a-blue: #faa541; --a-yellow: #ffd166;
  --psk: #e4e4e6; --psk2: #efeff0;
  --win: #ffffff; --win-border: #e4e4e6;
  --a-nav-on: #ffeedd; --a-tabs: #efeff0; --a-knob-off: #d0d0d0;
  --a-navi: #d6d6d8; --a-tab-ink: #cfcfd1; --a-chk-bd: #c9c9cb;
  --a-shimmer: rgba(255, 255, 255, .8);
  --a-indigo-2: #ffa63d; --a-indigo-3: #ffd9b0;
}
[data-theme="dark"] {
  --a-bg: #26272a; --a-side: #2e2f31; --a-line: #3d3f41;
  --a-card: #333537; --a-card-bd: #464849;
  --a-input: #3d3f41; --a-input-bd: #4b4d4f;
  --psk: #474949; --psk2: #3a3c3e;
  --win: #2e2f31; --win-border: #3d3f41;
  --a-nav-on: rgba(242, 103, 34, .28); --a-tabs: #3a3c3e; --a-knob-off: #57595b;
  --a-navi: #57595b; --a-tab-ink: #6b6d6f; --a-chk-bd: #5c5e60;
  --a-shimmer: rgba(255, 255, 255, .09);
  --a-indigo-3: rgba(255, 166, 61, .55);
}

.window {
  background: var(--win);
  border: 1px solid var(--win-border);
  border-radius: 14px;
  box-shadow: 0 18px 40px -24px rgba(35, 36, 38, .25);
  overflow: hidden;
  height: clamp(200px, 16vw, 224px); /* wide, desktop-like proportions */
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.cluster:hover .window { transform: translateY(-4px) scale(1.012); box-shadow: 0 26px 48px -26px rgba(242, 103, 34, .4); }
.win-bar {
  display: flex; align-items: center; gap: 6px; flex: none;
  padding: 9px 14px; border-bottom: 1px solid var(--a-line); background: var(--win);
  direction: ltr;
}
.win-bar i { width: 9px; height: 9px; border-radius: 50%; }
.win-bar i:nth-child(1) { background: #ed6a5e; }
.win-bar i:nth-child(2) { background: #f4bf4f; }
.win-bar i:nth-child(3) { background: #61c554; }
.win-bar .url { flex: 1; height: 9px; border-radius: 5px; background: var(--psk2); margin-left: 8px; max-width: 46%; }

.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.grow { flex: 1; }

@keyframes shimmer { 60% { transform: translateX(100%); } 100% { transform: translateX(100%); } }
@keyframes floaty {
  0%, 100% { transform: var(--float-rot, rotate(0deg)) translate(0, 0); }
  35% { transform: var(--float-rot, rotate(0deg)) translate(-5px, -7px); }
  70% { transform: var(--float-rot, rotate(0deg)) translate(3px, -2px); }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-16px, -10px); }
  55% { transform: translate(-6px, 4px); }
  80% { transform: translate(8px, -4px); }
}
@keyframes spinIn { from { transform: rotate(-80deg); opacity: 0; } }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes barw { from { width: 12%; } }
@keyframes popIn { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes togFlip {
  0%, 42% { background: var(--a-green); }
  50%, 92% { background: var(--a-knob-off); }
  100% { background: var(--a-green); }
}
@keyframes togKnob {
  0%, 42% { left: auto; right: 2px; }
  50%, 92% { left: 2px; right: auto; }
  100% { left: auto; right: 2px; }
}

/* admin preview shell (stays LTR in both languages — it mirrors the product UI) */
.appA { direction: ltr; display: flex; flex: 1; min-height: 0; background: var(--a-bg); }
.sideA { width: 23%; flex: none; background: var(--a-side); border-right: 1px solid var(--a-line); padding: 8px 7px; display: flex; flex-direction: column; gap: 5px; }
.navA { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 7px; }
.navA i { width: 8px; height: 8px; border-radius: 3px; background: var(--a-navi); flex: none; }
.navA .skA { height: 6px; flex: 1; max-width: 78%; }
.navA.on { background: var(--a-nav-on); }
.navA.on i { background: var(--brand); }
.mainA { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topA { flex: none; background: var(--a-side); border-bottom: 1px solid var(--a-line); display: flex; align-items: center; gap: 6px; padding: 6px 10px; }
.topA .logoA { width: 13px; height: 13px; border-radius: 4px; background: var(--brand); flex: none; }
.topA .searchA { margin-left: auto; width: 32%; height: 11px; border-radius: 999px; background: var(--a-input); border: 1px solid var(--a-input-bd); }
.topA .dotA { width: 8px; height: 8px; border-radius: 50%; background: var(--a-navi); flex: none; }
.topA .avA { width: 13px; height: 13px; border-radius: 50%; background: var(--brand); flex: none; }
.contentA { padding: 8px 11px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow: hidden; position: relative; }
.skA { position: relative; overflow: hidden; background: var(--psk); border-radius: 5px; }
.skA.light { background: var(--psk2); }
.skA::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--a-shimmer), transparent);
  animation: shimmer 2.2s infinite;
}
.btnA { height: 13px; border-radius: 6px; flex: none; }
.btnA.amber { width: 42px; background: var(--a-amber); }
.btnA.red { width: 38px; background: var(--a-red); }
.btnA.primary { width: 44px; background: var(--brand); }
.btnA.ghost { width: 34px; background: var(--psk); }
.tabsA { display: flex; gap: 4px; background: var(--a-tabs); border-radius: 8px; padding: 4px; flex: none; }
.tabA { flex: 1; height: 13px; border-radius: 5px; display: flex; align-items: center; justify-content: center; }
.tabA span { width: 66%; height: 5px; border-radius: 3px; background: var(--a-tab-ink); }
.tabA.on { background: var(--a-side); box-shadow: 0 1px 3px rgba(23, 23, 28, .1); }
.tabA.on span { background: var(--brand); }
.pairA { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fldA { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fldA .lab { height: 6px; width: 38%; }
.fldA.rtl { align-items: flex-end; }
.inpA { height: 17px; border-radius: 6px; background: var(--a-input); border: 1px solid var(--a-input-bd); }
.fldA .inpA, .fcardA .inpA { width: 100%; }
.checkA { width: 11px; height: 11px; border-radius: 3px; background: var(--a-green); position: relative; flex: none; animation: popIn .6s ease both .4s; }
.checkA::after { content: ""; position: absolute; left: 3px; top: 1px; width: 3.5px; height: 6px; border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(40deg); }
.togA { width: 18px; height: 10px; border-radius: 999px; flex: none; position: relative; }
.togA::after { content: ""; position: absolute; top: 1.5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(23, 23, 28, .2); }
.togA.on { background: var(--a-green); } .togA.on::after { right: 2px; }
.togA.off { background: var(--a-knob-off); } .togA.off::after { left: 2px; }
.togA.anim { animation: togFlip 5s ease-in-out infinite; }
.togA.anim::after { animation: togKnob 5s ease-in-out infinite; }
.circA { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--a-green-lt); position: relative; flex: none; }
.circA::after { content: ""; position: absolute; left: 2.5px; top: 1.5px; width: 3px; height: 4.5px; border-right: 1.5px solid var(--a-green-lt); border-bottom: 1.5px solid var(--a-green-lt); transform: rotate(40deg); }
.xA { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--a-red); position: relative; flex: none; opacity: .75; }
.xA::before, .xA::after { content: ""; position: absolute; left: 2px; top: 3.5px; width: 5px; height: 1.5px; background: var(--a-red); border-radius: 1px; }
.xA::before { transform: rotate(45deg); }
.xA::after { transform: rotate(-45deg); }
.chipA { min-width: 14px; height: 12px; border-radius: 4px; border: 1px solid var(--a-input-bd); display: flex; align-items: center; justify-content: center; flex: none; padding: 0 3px; background: var(--a-input); }
.chipA b { width: 4px; height: 5px; background: var(--a-chk-bd); border-radius: 1px; }
.trowA { display: flex; align-items: center; gap: 7px; background: var(--a-card); border: 1px solid var(--a-card-bd); border-radius: 7px; padding: 5px 7px; flex: none; animation: rowIn .5s ease both; }
.trowA:nth-of-type(2) { animation-delay: .1s; }
.trowA:nth-of-type(3) { animation-delay: .2s; }
.trowA:nth-of-type(4) { animation-delay: .3s; }
.fcardA { background: var(--a-card); border: 1px solid var(--a-card-bd); border-radius: 8px; padding: 7px 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 3px rgba(23, 23, 28, .05); }
.fheadA { display: flex; align-items: center; gap: 6px; }
.dragA { display: flex; flex-direction: column; gap: 1.5px; flex: none; }
.dragA i { display: block; width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
.dragA i:first-child { border-bottom: 4px solid var(--a-indigo-2); }
.dragA i:last-child { border-top: 4px solid var(--a-indigo-2); }
.copyA { width: 10px; height: 10px; border: 1.5px solid var(--a-indigo-2); border-radius: 2px; flex: none; position: relative; }
.copyA::after { content: ""; position: absolute; left: 2px; top: 2px; width: 8px; height: 8px; border: 1.5px solid var(--a-indigo-2); border-radius: 2px; background: var(--a-card); }
.fcardA.drag {
  --float-rot: rotate(-2.5deg);
  position: absolute; right: 12px; bottom: 34px; width: 52%; z-index: 3;
  transform: rotate(-2.5deg);
  box-shadow: 0 16px 30px -10px rgba(242, 103, 34, .45);
  border-color: var(--brand);
  animation: floaty 4s ease-in-out infinite;
}
.cursorA { position: absolute; right: 22px; bottom: 26px; z-index: 4; animation: drift 6s ease-in-out infinite; }
.cursorA svg { display: block; filter: drop-shadow(0 2px 3px rgba(23, 23, 28, .35)); }
.addA { align-self: center; height: 13px; width: 58px; border-radius: 6px; border: 1px dashed var(--a-indigo-2); background: var(--a-nav-on); flex: none; }

/* list pages: segmented filter tabs + table */
.segA { display: flex; gap: 4px; align-self: center; background: var(--a-tabs); border-radius: 9px; padding: 3px; flex: none; }
.segA .seg { display: flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 6px; }
.segA .seg.on { background: var(--a-side); box-shadow: 0 1px 3px rgba(23, 23, 28, .1); }
.segA .seg .skA { height: 5px; width: 20px; }
.segA .seg.on .skA { background: var(--a-indigo-3); }
.segA .cnt { width: 12px; height: 10px; border-radius: 3px; border: 1px solid var(--a-input-bd); background: var(--a-input); flex: none; }
.tableA { background: var(--a-card); border: 1px solid var(--a-card-bd); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(23, 23, 28, .05); }
.tsearch { display: flex; justify-content: flex-end; align-items: center; gap: 5px; }
.tsearch .s { width: 30%; height: 11px; border-radius: 999px; background: var(--a-input); border: 1px solid var(--a-input-bd); }
.tsearch .f { width: 9px; height: 9px; border-radius: 2px; background: var(--brand); flex: none; clip-path: polygon(0 0, 100% 0, 60% 55%, 60% 100%, 40% 85%, 40% 55%); }
.theadA { display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--a-line); padding: 0 2px 5px; }
.trA { display: flex; align-items: center; gap: 7px; padding: 1px 2px; animation: rowIn .5s ease both; }
.trA:nth-of-type(3) { animation-delay: .1s; }
.trA:nth-of-type(4) { animation-delay: .2s; }
.trA:nth-of-type(5) { animation-delay: .3s; }
.chkA { width: 9px; height: 9px; border-radius: 2.5px; border: 1.5px solid var(--a-chk-bd); flex: none; }
.pillA { display: inline-flex; align-items: center; border: 1px solid var(--a-input-bd); border-radius: 999px; padding: 3px 6px; flex: none; background: var(--a-input); }
.pillA .skA { height: 4.5px; width: 22px; }
.pillA.green { border-color: #a7dcc4; background: #e9f7f0; }
[data-theme="dark"] .pillA.green { border-color: rgba(34, 160, 107, .55); background: rgba(34, 160, 107, .16); }
.lnk { height: 5px; width: 13px; border-radius: 3px; flex: none; }
.lnk.n { background: var(--a-chk-bd); }
.lnk.r { background: var(--a-red); }
.lnk.am { background: var(--a-amber); }
.lnk.g { background: var(--a-green-lt); }

/* dashboard: date filter, stat cards, pie charts */
.dateA { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--a-card); border: 1px solid var(--a-card-bd); border-radius: 8px; padding: 7px 8px; flex: none; box-shadow: 0 1px 3px rgba(23, 23, 28, .05); }
.statsA { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; flex: none; }
.statA { background: var(--a-card); border: 1px solid var(--a-card-bd); border-radius: 8px; padding: 7px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; box-shadow: 0 1px 3px rgba(23, 23, 28, .05); }
.statA .lb { height: 5px; width: 80%; }
.statA .num { height: 12px; width: 45%; background: var(--a-indigo-3); animation: barw 1s ease both; }
.statA:nth-child(2) .num { width: 30%; animation-delay: .1s; }
.statA:nth-child(3) .num { width: 52%; animation-delay: .2s; }
.statA:nth-child(4) .num { width: 38%; animation-delay: .3s; }
.chartsA { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; flex: 1; min-height: 0; }
.chartA { background: var(--a-card); border: 1px solid var(--a-card-bd); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(23, 23, 28, .05); }
.chartA .ct { height: 6px; width: 55%; }
.pieWrap { align-self: center; animation: spinIn 1.2s ease both; }
.chartA:nth-child(2) .pieWrap { animation-delay: .15s; }
.chartA:nth-child(3) .pieWrap { animation-delay: .3s; }
.pieA { width: 32px; height: 32px; border-radius: 50%; display: block; animation: sway 5s ease-in-out infinite alternate; }
.pieA.p1 { background: conic-gradient(var(--a-pink) 0 22%, var(--a-blue) 22% 48%, var(--a-yellow) 48% 72%, var(--a-pink) 72% 84%, var(--a-blue) 84% 100%); }
.pieA.p2 { background: conic-gradient(var(--a-yellow) 0 30%, var(--a-pink) 30% 55%, var(--a-blue) 55% 100%); }
.pieA.p3 { background: conic-gradient(var(--a-blue) 0 78%, var(--a-pink) 78% 100%); }
.legA { display: flex; flex-direction: column; gap: 3.5px; }
.legA .row { gap: 4px; }
.legA i { width: 6px; height: 6px; border-radius: 2px; flex: none; }
.legA .skA { height: 4.5px; width: 26px; }

/* Modules subsection header — understated kicker separating the grid from
   the cluster cards above: purple dot + label + rule + outline count */
.modules-head {
  margin-top: 76px;
  display: flex; align-items: center; gap: 16px;
}
.modules-head::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand); flex: none;
}
.modules-head__label {
  font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2); white-space: nowrap;
}
html[lang="ar"] .modules-head__label { letter-spacing: 0; font-size: 15px; }
.modules-head__rule { flex: 1; height: 1px; background: var(--rule); transform-origin: left center; }
html[dir="rtl"] .modules-head__rule { transform-origin: right center; }
.modules-head__count {
  font-family: var(--font-kufi); font-weight: 700; line-height: .9;
  font-size: clamp(40px, 4.6vw, 64px);
  color: transparent; -webkit-text-stroke: 1.5px var(--num-ink);
  font-variant-numeric: tabular-nums; direction: ltr; flex: none;
}

/* Modules — bento: 4 core large, 7 additional small; numerals instead of icons */
.modules { margin-top: 24px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: stretch; }
.card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px; padding: 24px;
  /* No `transform` in this transition: GSAP fully owns card transforms
     (scroll reveal + tilt). A CSS transform transition here made the cards
     chase every GSAP write and could leave them resting mid-flight. */
  transition: box-shadow .45s var(--ease-out),
              border-color .45s var(--ease-out), background-color .45s var(--ease-out);
  transform-style: preserve-3d; will-change: transform;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, .15), transparent 45%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.card__title {
  font-size: 20px; line-height: 28px; font-weight: 500;
  transition: color .45s var(--ease-out);
}
.card__text {
  margin-top: 14px; font-size: 16px; line-height: 24px; color: var(--text-2);
  transition: color .45s var(--ease-out);
}
.card:hover {
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 18px 48px rgba(242, 103, 34, .32);
}
.card:hover::before { opacity: 1; }
.card:hover .card__title { color: #fff; }
.card:hover .card__text { color: rgba(255, 255, 255, .88); }

.module { display: flex; flex-direction: column; }
.module .card__body { flex: 1; position: relative; z-index: 1; }
.module__num {
  position: absolute; top: 10px; right: 18px;
  font-family: var(--font-kufi); font-weight: 700; line-height: 1;
  color: var(--num-ink); font-variant-numeric: tabular-nums; direction: ltr;
  transition: color .45s var(--ease-out), transform .55s var(--ease-out);
  pointer-events: none;
}
/* physical sides (not logical): direction:ltr on the numeral would flip
   inset-inline-end in RTL and land the number on top of the Arabic title */
html[dir="rtl"] .module__num { right: auto; left: 18px; }
.module .module__num { z-index: 1; }

/* Hackify blades: on hover the card keeps its deep-orange fill and the mark's
   shards slide in behind the content, bleeding off the card edge. */
.module::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: 50%; right: -22%; width: 90%; aspect-ratio: 113 / 117;
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 112.879 117.137" fill="none"%3E %3Cpath fill-rule="nonzero" fill="%23fff" fill-opacity=".55" d="M 112.879 61.312 L 64.836 28.660 L 49.711 6.949 Z M 112.879 61.312 "/%3E %3Cpath fill-rule="nonzero" fill="%23fff" fill-opacity=".55" d="M 112.879 61.312 L 71.609 59.953 L 55.199 47.723 Z M 112.879 61.312 "/%3E %3Cpath fill-rule="nonzero" fill="%23fff" d="M 112.879 61.312 L 63.355 73.523 L 42.688 61.250 Z M 112.879 61.312 "/%3E %3Cpath fill-rule="nonzero" fill="%23fff" d="M 112.879 61.312 L 39.926 40.797 L 12.453 0.000 Z M 112.879 61.312 "/%3E %3Cpath fill-rule="nonzero" fill="%23fff" d="M 28.918 117.137 L 0.000 95.355 L 112.879 61.312 L 28.918 117.137 "/%3E %3Cpath fill-rule="nonzero" fill="%23fff" fill-opacity=".55" d="M 112.879 61.312 L 68.875 100.812 L 56.559 100.805 Z M 112.879 61.312 "/%3E %3C/svg%3E') no-repeat center / contain;
  opacity: 0; transform: translate(14%, -50%) scale(.9);
  transition: opacity .5s var(--ease-out), transform .8s var(--ease-out);
}
.module:hover::after { opacity: .17; transform: translate(0, -50%) scale(1); }
html[dir="rtl"] .module::after { right: auto; left: -22%; transform: translate(-14%, -50%) scale(-.9, .9); }
html[dir="rtl"] .module:hover::after { transform: translate(0, -50%) scale(-1, 1); }
.card:hover .module__num { color: rgba(255, 255, 255, .5); transform: translateY(-4px); }
.module--core { grid-column: span 6; padding: 32px; min-height: 230px; }
.module--core .card__title { font-size: 24px; line-height: 32px; padding-inline-end: 72px; }
.module--core .card__body { max-width: 78%; }
.module--core .module__num { font-size: clamp(64px, 7vw, 96px); top: 18px; }
.module--extra { grid-column: span 4; }
.module--extra:nth-last-child(-n+4) { grid-column: span 3; }
.module--extra .card__title { font-size: 18px; line-height: 26px; padding-inline-end: 56px; }
.module--extra .card__text { font-size: 15px; line-height: 23px; }
.module--extra .card__body { max-width: 88%; }
.module--extra .module__num { font-size: 44px; }
.module__tag {
  position: relative; z-index: 1;
  margin-top: 20px; align-self: flex-start;
  background: var(--tag-bg); border: 1px solid var(--tag-border);
  color: var(--brand); border-radius: 80px; padding: 8px 12px;
  font-size: 14px; line-height: 16px; font-weight: 500;
  transition: background-color .45s, border-color .45s, color .45s;
}
[data-theme="dark"] .module__tag { color: #faa541; }
.card:hover .module__tag { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: #fff; }

/* ---------- CTA banner — full-bleed ---------- */
.banner {
  position: relative; overflow: hidden;
  margin-top: 40px;
  min-height: 420px;
  display: flex; align-items: center;
  padding-block: 96px;
}
.banner__bg { position: absolute; inset: -4%; z-index: 0; }
/* Pure-CSS spectrum: resolution-independent, so no pixelation on large
   screens. Ignition's deep orange leads, resolving into Impact gold. */
.banner__art {
  position: absolute; inset: 0; transform: scale(1.06); will-change: transform;
  background:
    radial-gradient(34% 64% at 62% 44%, rgba(242,103,34,.9) 0%, rgba(255,122,26,.58) 40%, rgba(255,122,26,0) 76%),
    radial-gradient(38% 72% at 92% 92%, rgba(255,209,102,.95) 0%, rgba(250,165,65,.45) 46%, rgba(255,209,102,0) 78%),
    radial-gradient(26% 52% at 3% 100%, rgba(242,103,34,.32) 0%, rgba(242,103,34,0) 74%),
    radial-gradient(30% 58% at 88% 18%, rgba(255,251,244,.95) 0%, rgba(255,251,244,0) 72%),
    linear-gradient(90deg, #fff6ee 0%, #fffdfb 26%, #fdeee1 46%, #fcdcb6 70%, #fde3ad 100%);
}
html[dir="rtl"] .banner__art {
  background:
    radial-gradient(34% 64% at 38% 44%, rgba(242,103,34,.9) 0%, rgba(255,122,26,.58) 40%, rgba(255,122,26,0) 76%),
    radial-gradient(38% 72% at 8% 92%, rgba(255,209,102,.95) 0%, rgba(250,165,65,.45) 46%, rgba(255,209,102,0) 78%),
    radial-gradient(26% 52% at 97% 100%, rgba(242,103,34,.32) 0%, rgba(242,103,34,0) 74%),
    radial-gradient(30% 58% at 12% 18%, rgba(255,251,244,.95) 0%, rgba(255,251,244,0) 72%),
    linear-gradient(270deg, #fff6ee 0%, #fffdfb 26%, #fdeee1 46%, #fcdcb6 70%, #fde3ad 100%);
}
.banner__inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.banner__title {
  font-family: var(--font-kufi); font-weight: 700;
  font-size: clamp(30px, 4.2vw, 52px); line-height: 1.35; color: var(--black-5);
}
html[lang="ar"] .banner__title { font-family: var(--font-arabic); font-weight: 600; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.3; }
.banner__sub { margin-top: 14px; font-size: clamp(16px, 2vw, 19px); line-height: 1.5; color: var(--black-5); }
.banner__cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- FAQ — asymmetric editorial ---------- */
.faq__grid {
  display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 40px 72px;
  align-items: start;
}
.faq__head { position: sticky; top: calc(var(--nav-h) + 24px); }
.faq__title {
  font-size: clamp(34px, 4.6vw, 56px); line-height: 1.1; font-weight: 500;
  letter-spacing: -0.015em;
}
html[lang="ar"] .faq__title { line-height: 1.3; letter-spacing: 0; }
.faq__list { border-top: 1px solid var(--faq-border); }
.faq-item { border-bottom: 1px solid var(--faq-border); padding-block: 28px; }
.faq-item__q {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 22px;
  text-align: start;
  font-size: clamp(18px, 2.2vw, 24px); line-height: 1.35;
}
.faq-item__num {
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  color: var(--text-3); font-variant-numeric: tabular-nums; direction: ltr;
  transition: color .35s;
}
.faq-item.open .faq-item__num { color: var(--brand); }
.faq-item.open .faq-item__q { font-weight: 500; }
.faq-item__icon { position: relative; width: 24px; height: 24px; flex: none; color: var(--brand); align-self: center; }
.faq-item__icon::before, .faq-item__icon::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
  transition: transform .45s var(--ease-out), opacity .3s;
}
.faq-item__icon::before { width: 13px; height: 1.6px; left: 5.5px; top: 11.2px; }
.faq-item__icon::after { width: 1.6px; height: 13px; left: 11.2px; top: 5.5px; }
.faq-item.open .faq-item__icon::after { transform: rotate(90deg); opacity: 0; }
.faq-item__a { overflow: hidden; height: 0; }
.faq-item__a p {
  padding-top: 16px; font-size: 16px; line-height: 26px; color: var(--text-2);
  max-width: 620px;
  margin-inline-start: calc(22px + 2.2em);
}

/* ---------- Footer ---------- */
.footer {
  position: relative; overflow: hidden;
  background: var(--black-5); color: #fff;
  padding: 88px 88px 0;
}
.footer__top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer__brand { display: flex; flex-direction: column; gap: 32px; align-items: flex-start; }
.footer__logo { --logo-fill: #ffffff; display: block; }
.footer__logo svg { display: block; height: 56px; width: auto; }
.footer__tagline { margin: -12px 0 0; max-width: 280px; font-size: 15px; line-height: 24px; color: var(--black-0); }
.footer__social { display: flex; gap: 16px; }
.footer__social a { width: 40px; height: 40px; color: #fff; --fill-0: currentColor; --stroke-0: currentColor; transition: transform .3s var(--ease-out), color .3s; }
.footer__social a:hover { transform: translateY(-3px); color: var(--accent); }
.footer__social svg { width: 100%; height: 100%; }
.footer__rule { display: block; height: 1px; margin-top: 64px;
  background: linear-gradient(90deg, transparent, rgba(240, 137, 74, .75) 50%, transparent); }
.footer__bottom { display: flex; justify-content: flex-end; padding-top: 20px;
  font-size: 14px; line-height: 20px; color: var(--black-0); }
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__col { min-width: 119px; display: flex; flex-direction: column; gap: 24px; }
.footer__col a { white-space: nowrap; }
.footer__col h4 { font-size: 16px; line-height: 24px; font-weight: 500; text-transform: uppercase; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__col a { color: var(--black-0); font-size: 16px; line-height: 24px; transition: color .3s; }
.footer__col a:hover { color: #fff; }
/* The page edge cuts the HACKIFY watermark so ~75% of the letters show
   (aspect-ratio = letter box 137.81 × 18.85, cropped to 75% height). */
.footer__watermark { margin-top: 36px; overflow: hidden; will-change: transform; aspect-ratio: 137.81 / 14.14; }
.footer__watermark-in { will-change: transform; }
.footer__watermark img { display: block; width: 100%; height: auto; }

/* ---------- Split-word mask reveal ---------- */
[data-split] .sw, .hero__title .w {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  padding-bottom: 0.15em; margin-bottom: -0.15em; /* keep descenders + Arabic marks visible */
}
[data-split] .sw > i, .hero__title .w > i {
  display: inline-block; font-style: normal; will-change: transform;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav__inner { padding-inline: 32px; }
  .clusters { grid-template-columns: 1fr; }
  .module--core { grid-column: span 6; }
  .module--extra, .module--extra:nth-last-child(-n+4) { grid-column: span 6; }
  .module--core .card__body, .module--extra .card__body { max-width: 100%; }
  .footer { padding-inline: 32px; }
  .faq__grid { grid-template-columns: 1fr; }
  .faq__head { position: static; }
}

@media (max-width: 760px) {
  /* the Features section is shorter than its desktop orb on phones —
     scale the orb down so it still reads as a full circle */
  .features .blob { width: 520px !important; height: 520px !important; top: 60px !important; }
  .hero__brandmark { width: 280px; inset-inline-end: -90px; top: 40px; }
  :root { --nav-h: 88px; }
  .nav__links { display: none; }
  .menu-btn { display: block; }
  .nav__inner { padding-inline: 20px; }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .hero__row { flex-direction: column; align-items: flex-start; margin-top: 32px; }
  .hero__cta { justify-content: flex-start; width: 100%; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__mock { margin-top: 56px; }
  .stats { grid-template-columns: 1fr; gap: 0; margin-top: 56px; padding-block: 8px 24px; }
  .stat { padding-block: 24px; }
  .stat + .stat { border-inline-start: 0; border-top: 1px solid var(--rule); }
  .section { padding-block: 72px; }
  .section__head--split { grid-template-columns: 1fr; align-items: start; }
  .section__sub { justify-self: start !important; }
  .findex { margin-top: 40px; --gutter: 34px; --bleed: 14px; }
  .frow__head { gap: 14px; }
  .frow__body p { margin-inline-start: calc(var(--gutter) + 14px); }
  .frow__icon { width: 30px; height: 30px; }
  .sectors { padding-block: 72px 64px; margin-inline: 6px; }
  .scarousel { margin-top: 40px; }
  .scarousel__viewport { padding-inline: 20px; }
  .scard { width: min(76vw, 330px); }
  .scarousel:not(.scarousel--on) .scard { width: 100%; }
  .modules-head { margin-top: 56px; }
  .cluster { padding: 22px 20px 20px; }
  .cluster__body { grid-template-columns: 1fr; }
  .modules { grid-template-columns: 1fr; }
  .module--core, .module--extra, .module--extra:nth-last-child(-n+4) { grid-column: span 1; }
  .module--core { min-height: 0; padding: 24px; }
  .banner { padding-block: 64px; min-height: 0; }
  .banner__inner { flex-direction: column; align-items: flex-start; }
  .banner__cta { width: 100%; }
  .banner__cta .btn { width: 100%; justify-content: center; }
  .faq-item__a p { margin-inline-start: 0; }
  .footer { padding: 56px 20px 0; }
  .footer__cols { gap: 32px; }
}

@media (max-width: 420px) {
  .container { width: calc(100% - 32px); }
  .frow__num { display: none; }
  .frow__head { grid-template-columns: 1fr auto; }
  .frow__body p { margin-inline-start: 0; }
  .menu-overlay { padding-inline: 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
