/* ------------------------------------------------------------------
   kareem00.com — shared stylesheet
   One ground (graphite, lit from above, fine grain), one ink (white),
   one accent (green) that appears only as the tint of the one action.
   Content sits on the ground; the single action is Liquid Glass.
   No JS, no inline styles; all assets local and relative to this file.
   ------------------------------------------------------------------ */

/* ---------- Fonts: SF on Apple devices; Heebo / Plex Arabic elsewhere ---------- */
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/heebo-hebrew-600.woff2) format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/heebo-latin-600.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/heebo-hebrew-500.woff2) format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/heebo-latin-500.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-arabic-400.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/plex-arabic-500.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-latin-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}

/* ---------- Tokens ---------- */
:root {
  --ground:   #16191c;                    /* the one ground */
  --ink:      #f5f5f7;                    /* the one ink */
  --ink-2:    rgba(245, 245, 247, 0.72);  /* secondary only */
  --accent:   #168b4a;                    /* green tint — on the one action only */
  --accent-glass: rgba(22, 139, 74, 0.86); /* stained glass: white label stays AA */
  --danger:   #ff8a80;
  --margin:   24px;
  --sans-he:  -apple-system, BlinkMacSystemFont, "Heebo", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans-ar:  -apple-system, BlinkMacSystemFont, "IBM Plex Sans Arabic", "Segoe UI", "Noto Sans Arabic", Roboto, sans-serif;
}
@media (min-width: 900px) { :root { --margin: 48px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  min-height: 100%;
  /* one ground, one very large soft light falloff from above (on the canvas, no fixed attachment: iOS-safe) */
  background-color: var(--ground);
  background-image: radial-gradient(150% 85% at 50% -20%, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0) 65%);
  background-repeat: no-repeat;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: transparent;
  font-family: var(--sans-he);
  font-weight: 500;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding:
    calc(var(--margin) + env(safe-area-inset-top, 0px))
    calc(var(--margin) + env(safe-area-inset-right, 0px))
    calc(var(--margin) + env(safe-area-inset-bottom, 0px))
    calc(var(--margin) + env(safe-area-inset-left, 0px));
}
html[lang="ar"] body { font-family: var(--sans-ar); font-weight: 400; }

/* material grain over the ground (fixed, under all content) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- Stage: one column, start-aligned, vertically centred ---------- */
.stage {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}
.card {
  width: 100%;
  text-align: center;
}

/* ---------- Content layer ---------- */
.name {
  margin: 0;
  font-weight: 600;
  font-size: clamp(3.1rem, 15.4vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.028em;
  color: var(--ink);
  text-wrap: balance;
  animation: fade 700ms ease-out both;
}
.phone {
  display: inline-block;
  margin-top: 22px;
  font-weight: 500;
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  letter-spacing: 0.01em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 160ms ease;
  animation: fade 700ms ease-out 60ms both;
}
.phone:hover { color: var(--ink); }

/* ---------- The one functional element: Liquid Glass (regular) pill ---------- */
.actions { margin-top: 40px; animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 100ms both; }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px 0 22px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.03) 48%, rgba(255, 255, 255, 0) 100%),
    var(--accent-glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 18px -10px rgba(0, 0, 0, 0.35),
    0 14px 32px -10px rgba(0, 0, 0, 0.6);
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
/* lighting on the rim: bright on top, fades out — not an outline */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.10) 40%, rgba(255, 255, 255, 0.02) 70%, rgba(255, 255, 255, 0.14) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 18px -10px rgba(0, 0, 0, 0.35),
    0 18px 36px -10px rgba(0, 0, 0, 0.65);
}
.btn:active { transform: scale(0.97); }

@media (min-width: 900px) {
  .actions { margin-top: 44px; }
  .btn { min-height: 56px; padding: 0 28px 0 26px; font-size: 1.1875rem; gap: 12px; }
  .btn svg { width: 24px; height: 24px; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn, .submit { background: #19864b; }
}
@media (prefers-reduced-transparency: reduce) {
  .btn, .submit {
    background: #19864b;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ---------- Footer: quiet secondary entry (bottom-left = end side in RTL) ---------- */
.foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  animation: fade 700ms ease-out 200ms both;
}
.clients {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, color 160ms ease;
}
.clients svg { width: 16px; height: 16px; flex: none; }
.clients:hover { color: var(--ink); background: rgba(255, 255, 255, 0.11); }
.clients:active { background: rgba(255, 255, 255, 0.14); }

/* keyboard focus */
a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(245, 245, 247, 0.9);
  outline-offset: 3px;
}

/* ---------- 404 ---------- */
.code {
  margin: 0;
  font-weight: 600;
  font-size: clamp(5rem, 24vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
  animation: fade 700ms ease-out both;
}
.home {
  display: inline-block;
  margin-top: 22px;
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 160ms ease;
  animation: fade 700ms ease-out 60ms both;
}
.home:hover { color: var(--ink); }

/* ---------- Login (Arabic) ---------- */
.gate {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.gate h1 {
  margin: 0 0 28px;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  animation: fade 700ms ease-out both;
}
.gate .hello {                       /* «صباح الخير» فوق «تسجيل الدخول» — بالوقت (gate.greeting) */
  margin: 0 0 6px;
  font-size: 1.0625rem;
  color: var(--ink-2);
  text-align: center;
  animation: fade 700ms ease-out both;
}
.gate form { animation: fade 700ms ease-out 60ms both; }
.field { display: block; margin: 0 0 16px; }
.field span {
  display: block;
  margin: 0 20px 8px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.field input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  font: inherit;
  font-family: var(--sans-ar);
  font-size: 1.0625rem;              /* 17px — no iOS zoom */
  line-height: 1.4;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  border: 0;
  border-radius: 999px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.field input:focus {
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 0 0 2px var(--ink);
}
.field input[name="c"] { letter-spacing: 0.26em; font-variant-numeric: tabular-nums; }
.field input[name="ph"] { letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.field input:-webkit-autofill,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #272b30 inset;
  transition: background-color 9999s ease-out;
}

.submit {
  position: relative;
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 26px;
  padding: 12px 20px;
  font: inherit;
  font-family: var(--sans-ar);
  font-weight: 500;
  font-size: 1.0625rem;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.03) 48%, rgba(255, 255, 255, 0) 100%),
    var(--accent-glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 18px -10px rgba(0, 0, 0, 0.35),
    0 14px 32px -10px rgba(0, 0, 0, 0.6);
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.submit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.10) 40%, rgba(255, 255, 255, 0.02) 70%, rgba(255, 255, 255, 0.14) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.submit:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 18px -10px rgba(0, 0, 0, 0.35),
    0 18px 36px -10px rgba(0, 0, 0, 0.65);
}
.submit:active { transform: scale(0.98); }

.err {
  margin: 0 20px 18px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--danger);
}

.note {
  margin: 0 20px 18px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.alt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  animation: fade 700ms ease-out 120ms both;
}
.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-family: var(--sans-ar);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, color 160ms ease;
}
.link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.link:active { background: rgba(255, 255, 255, 0.11); }
.link.ok { color: var(--ink); background: rgba(22, 139, 74, 0.35); }

/* the hidden attribute wins over display rules (pk.js shows passkey buttons only where they work) */
[hidden] { display: none !important; }

/* ---------- Passkeys, sign-up, account (Arabic) ---------- */
.submit.pk { margin-top: 0; }
.submit.quiet {
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.submit.quiet::before { display: none; }
.or {
  margin: 22px 0 18px;
  font-size: 0.875rem;
  color: var(--ink-2);
  text-align: center;
}
.center { text-align: center; }
.fine {
  margin: 4px 20px 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.fine a { color: var(--ink); }
.gate h2 {
  margin: 0 0 10px;
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--ink);
}
.box {
  margin: 0 0 18px;
  padding: 16px 18px 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  animation: fade 700ms ease-out 60ms both;
}
.box .note { margin: 0 0 10px; }
.box .field { margin-top: 10px; }
.rows { list-style: none; margin: 0 0 6px; padding: 0; }
.rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-height: 48px;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.rows li:first-child { border-top: 0; }
.rows small { display: block; font-size: 0.8125rem; color: var(--ink-2); }
.rows form, .box form { animation: none; }
.rows form { margin: 0; }
.acct .who { flex: 1 1 200px; }
.acct .who b { display: block; margin-bottom: 2px; font-weight: 500; font-size: 0.75rem; color: var(--ink-2); }
.acct .acts { display: flex; gap: 4px; }
.acct details { flex-basis: 100%; }
.acct summary { list-style: none; width: max-content; }
.acct summary::-webkit-details-marker { display: none; }

/* ---------- Legal links (card footer, login pages) ---------- */
.legal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 6px;
  margin-top: 20px;
}
.legal a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
  font-size: 0.8125rem;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 999px;
}
.legal a:hover { color: var(--ink); text-decoration: underline; }
.foot { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.foot .legal { margin-top: 0; justify-content: flex-start; }
.foot .clients { margin-inline-start: auto; }   /* stays bottom-left even when the links wrap above it */

/* ---------- Legal documents (Hebrew + Arabic) ---------- */
.doc {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.75;
}
.doc section[lang="ar"] { font-family: var(--sans-ar); }
.doc h1 { margin: 0 0 6px; font-weight: 600; font-size: 1.875rem; line-height: 1.15; }
.doc h2 { margin: 30px 0 6px; font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
.doc p, .doc li { margin: 0 0 10px; font-size: 1rem; color: var(--ink-2); }
.doc ul { margin: 0 0 10px; padding-inline-start: 22px; }
.doc a { color: var(--ink); }
.doc .meta { font-size: 0.875rem; }
.doc .langs { display: flex; gap: 6px; margin: 0 0 18px; }
.doc .langs a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.07); text-decoration: none; font-size: 0.9375rem; }
.doc hr { margin: 44px 0 34px; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.doc .home { margin-top: 30px; animation: none; }

/* ---------- Motion ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .name, .phone, .actions, .foot, .code, .home, .gate h1, .gate .hello, .gate form, .alt { animation: none; }
  * { transition: none !important; }
}
