/* =========================================================
   Neqati theme: shared tokens, canvas, base type, controls.
   Loaded first by every page.
   ========================================================= */
/* IBM Plex Sans (Latin) and IBM Plex Sans Arabic: one family designed for both
   scripts. Self-hosted from public/fonts, SIL Open Font License (fonts/OFL.txt). */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("/fonts/ibm-plex-sans-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: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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;
}

:root {
  color-scheme: dark;

  /* canvas (the gradient is built from these) */
  --canvas-0: #050b1c;
  --canvas-1: #08163a;
  --canvas-2: #0a1d47;
  --glow-blue: rgba(47, 99, 230, .34);
  --glow-violet: rgba(98, 72, 214, .22);
  --glow-teal: rgba(22, 140, 190, .16);

  /* elevation: each step is lighter, never pure inversion */
  --surface-1: #0d1a38;   /* panels, header */
  --surface-2: #132449;   /* raised: forms, hover */
  --surface-3: #1b2f5e;   /* highest: icon tiles, selected */
  --field: #070f26;       /* inset: inputs sit below their panel */

  /* text */
  --text: #eef3ff;
  --text-2: #b6c3e0;
  --text-3: #93a4c9;      /* placeholder, captions */
  --link: #9cc0ff;

  /* lines */
  --border: #263a68;          /* hairlines, decorative */
  --border-strong: #6c82b3;   /* control outlines (3:1+) */

  /* action */
  --action: #ffb938;
  --action-hover: #ffca63;
  --action-ink: #0a1226;
  --action-glow: rgba(255, 185, 56, .38);
  --disabled-bg: #25314f;
  --disabled-ink: #a5b2d0;

  /* state */
  --focus: #8cc2ff;
  --success: #52e0a0;
  --error: #ff9a90;

  /* pass accent (wallet mockups) */
  --pass-1: #2f63e6;
  --pass-2: #1b3796;

  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* passes and phone screens use the phone's own system font, like the real apps */
  --device-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Geeza Pro", "Noto Sans Arabic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; background: var(--canvas-0); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* One continuous gradient across the whole page: soft glows at the top,
   left-middle and lower right over a long navy ramp. Sections stay
   transparent so there are no seams. */
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background-color: var(--canvas-0);
  background-image:
    radial-gradient(1100px 720px at 82% 0%, var(--glow-blue), transparent 70%),
    radial-gradient(900px 800px at 0% 36%, var(--glow-violet), transparent 70%),
    radial-gradient(1000px 800px at 100% 74%, var(--glow-teal), transparent 70%),
    linear-gradient(180deg, var(--canvas-0) 0%, var(--canvas-1) 30%, var(--canvas-2) 58%, var(--canvas-0) 100%);
  background-repeat: no-repeat;
  position: relative;
}
/* faint grain to dither the dark ramp (prevents banding) */
body::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

h1, h2, h3 { line-height: 1.15; margin: 0; }
a { color: var(--link); }
code {
  background: var(--surface-3); color: var(--text); font-family: var(--mono);
  padding: 1px 6px; border-radius: 5px; font-size: .88em;
}
::selection { background: var(--pass-1); color: #fff; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; line-height: 1.2;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--action); color: var(--action-ink);
  box-shadow: 0 10px 30px -8px var(--action-glow);
}
.btn-primary:hover { background: var(--action-hover); box-shadow: 0 12px 34px -6px var(--action-glow); }
.btn-primary:focus-visible { outline-color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-2); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--disabled-bg); color: var(--disabled-ink); border-color: transparent;
  box-shadow: none; cursor: not-allowed; transform: none;
}
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; padding: 16px; font-size: 16px; }

/* ---------- form controls ---------- */
label { color: var(--text); font-weight: 600; font-size: 14px; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--field);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px;
  outline: 2px solid transparent; transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--text-2); }
input:focus, select:focus, textarea:focus {
  border-color: var(--focus); box-shadow: 0 0 0 3px rgba(140, 194, 255, .35);
}
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b6c3e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { background: #101f42; color: var(--text); }

/* ---------- Arabic (right to left) ---------- */
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
html[lang="ar"] body { line-height: 1.75; }
html[lang="ar"] :is(h1, h2, h3, p, label, .btn, li, a, strong) { letter-spacing: 0; }
html[lang="ar"] :is(h1, h2, h3) { line-height: 1.4; }
html[dir="rtl"] select { background-position: left 14px center; padding-right: 14px; padding-left: 40px; }
html[dir="rtl"] input[dir="ltr"] { text-align: right; }
/* Two-word brand names in Arabic text (<bdi class="nb">Apple Wallet</bdi>) never split across lines */
.nb { white-space: nowrap; }
/* The English pages show only a word or two of Arabic (the language link); the
   system Arabic font avoids downloading the Arabic web font files for that. */
html:not([lang="ar"]) [lang="ar"] { font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
textarea { resize: vertical; }
/* honeypot: invisible without an offset, so it can't cause sideways scrolling in either direction */
.hp { position: absolute; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; }

/* ---------- icons ---------- */
.icon {
  width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* phones: 16px controls (also stops iOS zooming on focus) and 44px targets */
@media (max-width: 719px) {
  label { font-size: 16px; }
  input:not(.hp), select, textarea { font-size: 16px; min-height: 44px; }
}
