@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #040816;
  --surface: #0b1330;
  --surface-2: #111c44;
  --hairline: rgba(140, 170, 255, 0.14);
  --hairline-strong: rgba(140, 170, 255, 0.28);
  --cyan: #5ce1ff;
  --blue: #2f6bff;
  --violet: #9a5bff;
  --safe: #2bd98f;
  --warn: #ffb23e;
  --danger: #ff4d5e;
  --danger-text: #ff7a87;
  --flag-red: #ef3340;
  --flag-green: #009739;

  --text: #eaf0ff;
  --text-2: #aab7de;
  --text-3: #8492bf;
  --accent: var(--cyan);

  --grad: linear-gradient(120deg, var(--cyan), var(--blue) 52%, var(--violet));
  --grad-bright: linear-gradient(120deg, #84ecff, #6f9dff 55%, #b190ff);
  --panel: linear-gradient(180deg, rgba(17, 28, 68, 0.78), rgba(11, 19, 48, 0.82));

  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --gutter: clamp(20px, 4.5vw, 44px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.i18n-pending body {
  visibility: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 350;
  line-height: 1.65;
  color: var(--text);
  background: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

:lang(ar) h1,
:lang(ar) h2,
:lang(ar) h3 {
  line-height: 1.4;
  letter-spacing: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

::selection {
  background: rgba(92, 225, 255, 0.3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--text);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  flex: none;
  width: 1.25em;
  height: 1.25em;
}

[dir="rtl"] .i--dir {
  transform: scaleX(-1);
}

.mono {
  font-family: var(--mono);
}

/* Layers: backdrop (0) < page content (1) < 3D canvas (2) < navigation (10) */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 55vh at 88% -5%, rgba(47, 107, 255, 0.22), transparent 62%),
    radial-gradient(48vw 50vh at -5% 28%, rgba(92, 225, 255, 0.08), transparent 60%),
    radial-gradient(60vw 60vh at 105% 105%, rgba(154, 91, 255, 0.13), transparent 60%);
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/img/khatim.svg") 50% 0 / 120px 120px;
  opacity: 0.085;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 72% 32%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 65% at 72% 32%, #000 0%, transparent 78%);
}

[dir="rtl"] .backdrop {
  transform: scaleX(-1);
}

main,
.footer {
  position: relative;
  z-index: 1;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.webgl-ready .scene {
  opacity: 1;
}

.shield-slot {
  position: relative;
  display: grid;
  /* A definite track, so the fallback's percentage height resolves against the slot instead of its own content. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}

.shield-fallback {
  width: auto;
  max-width: 100%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 0 42px color-mix(in srgb, var(--accent) 45%, transparent));
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.webgl-ready .shield-fallback {
  opacity: 0;
  visibility: hidden;
}

/* Flag thread: the only place the UAE flag colours appear */

.flag-thread {
  display: inline-flex;
  flex: none;
  width: 44px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
}

.flag-thread i {
  flex: 1;
}

.flag-thread i:nth-child(1) {
  background: var(--flag-red);
}

.flag-thread i:nth-child(2) {
  background: var(--flag-green);
}

.flag-thread i:nth-child(3) {
  background: #fff;
}

.flag-thread i:nth-child(4) {
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.flag-thread--wide {
  display: flex;
  width: min(240px, 40%);
  height: 2px;
  margin-inline: auto;
  opacity: 0.9;
}

/* Navigation */

.nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  height: var(--nav-h);
  border-block-end: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}

.nav.is-stuck {
  background: rgba(4, 8, 22, 0.78);
  border-block-end-color: var(--hairline);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.nav .nav__menu {
  display: none;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: rgba(11, 19, 48, 0.6);
  color: var(--text);
  width: 40px;
  height: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: var(--r-sm);
}

.brand__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--hairline-strong), 0 6px 20px rgba(47, 107, 255, 0.35);
}

.brand__name {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__ai {
  display: inline-block;
  margin-inline-start: 2px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--grad-bright);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 0.14em;
}

.nav__links {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}

.nav__links a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

.nav__links a:hover,
.nav__links a[aria-current="true"] {
  color: var(--text);
  background: rgba(140, 170, 255, 0.09);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__actions--end {
  margin-inline-start: auto;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(11, 19, 48, 0.6);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 0.2s, background-color 0.2s;
}

.lang-toggle:hover {
  border-color: var(--hairline-strong);
  background: rgba(17, 28, 68, 0.9);
}

.lang-toggle .i {
  color: var(--cyan);
}

@media (max-width: 1120px) {
  .nav__links {
    position: absolute;
    inset-block-start: calc(100% + 8px);
    inset-inline: var(--gutter);
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    background: #0b1330;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  }

  .nav.is-open .nav__links {
    display: flex;
  }

  .nav__links a {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 1rem;
  }

  .nav .nav__menu {
    display: inline-grid;
  }

  .no-js .nav .nav__menu {
    display: none;
  }

  .nav__actions {
    margin-inline-start: auto;
  }
}

@media (max-width: 520px) {
  .nav .nav__cta {
    display: none;
  }

  .nav__inner {
    gap: 10px;
  }

  .nav__actions {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand__name {
    font-size: 0.9rem;
  }

  .lang-toggle {
    padding: 0 12px;
  }

  .lang-toggle .i {
    display: none;
  }
}

@media (max-width: 350px) {
  .brand__ai {
    display: none;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 550;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background-color 0.2s, border-color 0.2s, filter 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--grad-bright);
  color: #030614;
  box-shadow: 0 10px 34px -10px rgba(92, 160, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 14px 44px -10px rgba(92, 160, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--ghost {
  border-color: var(--hairline-strong);
  background: rgba(11, 19, 48, 0.55);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: rgba(140, 170, 255, 0.5);
  background: rgba(17, 28, 68, 0.9);
}

.btn--small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.btn--icon {
  width: 52px;
  padding: 0;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  filter: saturate(0.4) brightness(0.75);
  box-shadow: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(140, 170, 255, 0.1);
}

.icon-btn--small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

/* Shared text styles */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

:lang(ar) .eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0;
}

.eyebrow--danger {
  color: var(--danger-text);
}

.grad {
  background: var(--grad-bright);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.fineprint {
  color: var(--text-3);
  font-size: 0.86rem;
  line-height: 1.6;
}

.fineprint--center {
  max-width: 62ch;
  margin: 28px auto 0;
  text-align: center;
}

/* App store buttons */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 20px 8px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  background: rgba(4, 8, 22, 0.7);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

[dir="rtl"] .store {
  padding: 8px 16px 8px 20px;
}

.store .i {
  width: 26px;
  height: 26px;
}

.store__text {
  display: grid;
  line-height: 1.15;
}

.store__text small {
  color: var(--text-2);
  font-size: 0.72rem;
}

.store__text strong {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a.store[href]:hover {
  border-color: rgba(140, 170, 255, 0.55);
  background: var(--surface);
  transform: translateY(-2px);
}

.store[aria-disabled="true"] {
  border-style: dashed;
  border-color: var(--hairline);
  color: var(--text-3);
  cursor: default;
}

.store[aria-disabled="true"] small {
  color: var(--warn);
}

/* Footer */

.footer {
  margin-block-start: clamp(40px, 6vw, 80px);
  padding-block: 0 max(40px, env(safe-area-inset-bottom));
  border-block-start: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(11, 19, 48, 0.5), rgba(4, 8, 22, 0.9));
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px 48px;
  padding-block-start: 44px;
}

.footer__brand {
  display: grid;
  gap: 16px;
  justify-items: start;
  max-width: 62ch;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 8px 24px;
}

.footer__links a {
  padding-block: 6px;
  color: var(--text-2);
  font-size: 0.95rem;
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__legal {
  grid-column: 1 / -1;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 0.86rem;
}

@media (max-width: 720px) {
  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__links {
    justify-content: flex-start;
  }
}

/* Scroll reveal, enabled only once scripts are running */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@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;
  }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
