/* OxyMoon — shared tokens, type and components.
   Two themes on one token set: the night side (default) and the day side.
   The BankGeeks pages swap in the app's own navy / platinum tokens (data-brand). */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("/assets/fonts/plex-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("/assets/fonts/plex-arabic-600.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("/assets/fonts/plex-arabic-700.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ── tokens: night side ─────────────────────────────────────────────── */
:root {
  --bg: #07090e;
  --bg-2: #0b0e15;
  --surface: #10141d;
  --surface-2: #161b26;
  --line: rgb(222 228 240 / 0.09);
  --line-strong: rgb(222 228 240 / 0.18);
  --text: #eceae4;
  --text-2: #b3b8c4;
  --text-3: #8a90a0;
  --accent: #9ccbff;
  --accent-soft: rgb(156 203 255 / 0.12);
  --btn-bg: #eceae4;
  --btn-text: #07090e;
  --btn-hover: #ffffff;
  --good: #57d39a;
  --warn: #e9b44c;
  --bad: #ff9a85;
  /* the moon, read by the WebGL hero */
  --moon-lit: 238 235 228;
  --moon-dark: 18 22 32;
  --moon-glow: 156 203 255;
  --moon-shadow-alpha: 1;
  --sky: transparent;

  --radius-card: 22px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 30px 60px -30px rgb(0 0 0 / 0.7);
  --font-display: "Unbounded", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Plex Arabic", "Geist", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

/* ── tokens: day side (system light, or the toggle) ─────────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f4f7;
    --bg-2: #e9ecf1;
    --surface: #ffffff;
    --surface-2: #f6f7f9;
    --line: rgb(14 17 23 / 0.09);
    --line-strong: rgb(14 17 23 / 0.18);
    --text: #0e1117;
    --text-2: #414856;
    --text-3: #5d6574;
    --accent: #1d5bc9;
    --accent-soft: rgb(29 91 201 / 0.09);
    --btn-bg: #0e1117;
    --btn-text: #f2f4f7;
    --btn-hover: #1c2230;
    --good: #1e7a4f;
    --warn: #9a6a12;
    --bad: #b54334;
    --moon-lit: 255 255 255;
    --moon-dark: 196 206 224;
    --moon-glow: 29 91 201;
    --moon-shadow-alpha: 0.55;
    --sky: radial-gradient(60% 60% at 60% 45%, rgb(193 216 245 / 0.75), rgb(242 244 247 / 0) 70%);
    --shadow-card: 0 1px 2px rgb(14 17 23 / 0.05), 0 24px 48px -28px rgb(20 40 80 / 0.28);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f4f7;
  --bg-2: #e9ecf1;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --line: rgb(14 17 23 / 0.09);
  --line-strong: rgb(14 17 23 / 0.18);
  --text: #0e1117;
  --text-2: #414856;
  --text-3: #5d6574;
  --accent: #1d5bc9;
  --accent-soft: rgb(29 91 201 / 0.09);
  --btn-bg: #0e1117;
  --btn-text: #f2f4f7;
  --btn-hover: #1c2230;
  --good: #1e7a4f;
  --warn: #9a6a12;
  --bad: #b54334;
  --moon-lit: 255 255 255;
  --moon-dark: 196 206 224;
  --moon-glow: 29 91 201;
  --moon-shadow-alpha: 0.55;
  --sky: radial-gradient(60% 60% at 60% 45%, rgb(193 216 245 / 0.75), rgb(242 244 247 / 0) 70%);
  --shadow-card: 0 1px 2px rgb(14 17 23 / 0.05), 0 24px 48px -28px rgb(20 40 80 / 0.28);
  color-scheme: light;
}

/* ── the BankGeeks pages wear the app's own tokens ──────────────────── */
:root[data-brand="bankgeeks"] {
  --bg: #070d18;
  --bg-2: #0a1222;
  --surface: #101b2d;
  --surface-2: #16233a;
  --line: rgb(201 207 216 / 0.10);
  --line-strong: rgb(201 207 216 / 0.20);
  --text: #eff2f7;
  --text-2: #b4bdcc;
  --text-3: #8b96a8;
  --accent: #9fbde6;
  --accent-soft: rgb(124 163 216 / 0.16);
  --btn-bg: #eff2f7;
  --btn-text: #0a1428;
  --btn-hover: #ffffff;
  --good: #3ab57f;
}
@media (prefers-color-scheme: light) {
  :root[data-brand="bankgeeks"]:not([data-theme="dark"]) {
    --bg: #f3f5f9;
    --bg-2: #e9edf4;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --line: rgb(16 27 45 / 0.10);
    --line-strong: rgb(16 27 45 / 0.18);
    --text: #101b2d;
    --text-2: #3f4b60;
    --text-3: #57637a;
    --accent: #1f3a66;
    --accent-soft: #e8edf6;
    --btn-bg: #1f3a66;
    --btn-text: #ffffff;
    --btn-hover: #172d51;
    --good: #1e7a4f;
  }
}
:root[data-brand="bankgeeks"][data-theme="light"] {
  --bg: #f3f5f9;
  --bg-2: #e9edf4;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --line: rgb(16 27 45 / 0.10);
  --line-strong: rgb(16 27 45 / 0.18);
  --text: #101b2d;
  --text-2: #3f4b60;
  --text-3: #57637a;
  --accent: #1f3a66;
  --accent-soft: #e8edf6;
  --btn-bg: #1f3a66;
  --btn-text: #ffffff;
  --btn-hover: #172d51;
  --good: #1e7a4f;
}

/* ── reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
:lang(ar) body, body:lang(ar), [lang="ar"] { font-family: var(--font-ar); }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@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; }
}

/* ── layout ─────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(80px, 11vw, 160px); position: relative; }
.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-text); padding: 10px 16px; border-radius: var(--radius-pill);
  text-decoration: none; font-weight: 600; transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

/* ── type ───────────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
:lang(ar) .display, .display:lang(ar) { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.25; font-weight: 700; }
.h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.3rem); }
.h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.25; }
:lang(ar) .h3 { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; }
.lede { color: var(--text-2); font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem); line-height: 1.6; max-width: 58ch; }
.muted { color: var(--text-3); }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
:lang(ar) .eyebrow { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ── buttons ────────────────────────────────────────────────────────── */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer; border: 0;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s var(--ease), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
:dir(rtl) .btn svg.dir { transform: scaleX(-1); }
.btn:active { transform: translate(var(--mx), calc(var(--my) + 1px)) scale(0.985); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.5); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-primary:hover svg:not(.dir) { transform: translateX(3px); }
.btn-primary:hover svg.dir { transform: translateX(3px); }
:dir(rtl) .btn-primary:hover svg.dir { transform: scaleX(-1) translateX(3px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--text-3); background: var(--accent-soft); }
.btn[aria-disabled="true"] { opacity: 0.7; cursor: default; }
.link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; text-decoration: none;
}
.link svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.link:hover svg { transform: translateX(3px); }
:dir(rtl) .link svg { transform: scaleX(-1); }
:dir(rtl) .link:hover svg { transform: scaleX(-1) translateX(3px); }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); backdrop-filter: none; } }
.nav { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand-mark { width: 28px; height: 28px; color: var(--text); }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 26px; margin-inline-start: auto; }
.nav-links a { text-decoration: none; color: var(--text-2); font-size: 0.95rem; font-weight: 500; transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: 0.92rem; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-pill); display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line-strong); cursor: pointer; color: var(--text);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { background: var(--accent-soft); border-color: var(--text-3); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .sun { display: block; }
  :root:not([data-theme]) .theme-toggle .moon { display: none; }
}
.lang-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 3px; }
.lang-toggle button {
  border: 0; background: transparent; border-radius: var(--radius-pill); padding: 0 12px; min-height: 34px;
  font-size: 0.88rem; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }
.lang-toggle button:lang(ar) { font-family: var(--font-ar); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-actions { margin-inline-start: auto; }
}
/* small phones: the hero and footer carry the contact button; the bar keeps brand + theme */
@media (max-width: 480px) {
  .nav-cta { display: none; }
}

/* ── footer ─────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 40px; color: var(--text-2); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; color: var(--text-3); font-size: 0.88rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ── reveal on scroll (JS adds .in; without JS everything is visible) ── */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ── language switching (BankGeeks pages) ───────────────────────────── */
html[lang="ar"] [data-l="en"], html[lang="en"] [data-l="ar"] { display: none !important; }

/* ── phone frame ────────────────────────────────────────────────────── */
.phone {
  position: relative; width: min(100%, 320px); aspect-ratio: 9 / 19.5;
  border-radius: 44px; padding: 10px; background: linear-gradient(145deg, #2a2f3a, #0d1017);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08) inset, 0 40px 80px -30px rgb(0 0 0 / 0.75), 0 0 0 1px rgb(0 0 0 / 0.6);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 35px; overflow: hidden; background: #f3f5f9; }
.phone-screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

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