@font-face { font-family: 'Sora'; font-weight: 400; font-display: swap; src: url('/fonts/sora-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url('/fonts/sora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2'); }

:root {
  --bg: #FFFFFF;
  --fg: #0A0A0A;
  --on-gold: #0A0A0A;
  --gold: #C49A3C;
  --gold-text: #8A6A1F; /* darker gold for small text on white (contrast) */
  --gold-soft: rgba(196, 154, 60, 0.18);
  --muted: rgba(10, 10, 10, 0.64);
  --faint: rgba(10, 10, 10, 0.5);
  --line: rgba(10, 10, 10, 0.12);
  --card: #FAFAFA;
  --input: #FFFFFF;
  --placeholder: rgba(10, 10, 10, 0.4);
  --err: #B3261E;
  --shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 12px 32px rgba(10, 10, 10, 0.05);
  --robot-shadow: rgba(10, 10, 10, 0.13);
  --font: 'Sora', 'Plex Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0A0A;
  --fg: #FAFAFA;
  --gold-text: #D8B567; /* lighter gold for small text on black (contrast) */
  --gold-soft: rgba(196, 154, 60, 0.28);
  --muted: rgba(250, 250, 250, 0.68);
  --faint: rgba(250, 250, 250, 0.52);
  --line: rgba(250, 250, 250, 0.14);
  --card: #141414;
  --input: #0F0F0F;
  --placeholder: rgba(250, 250, 250, 0.42);
  --err: #F2B8B5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.45);
  --robot-shadow: rgba(250, 250, 250, 0.14);
}
html { color-scheme: light; }
html[dir="rtl"] { --font: 'Plex Arabic', 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: clip; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}
.glow {
  position: fixed;
  inset: -30vh -20vw auto auto;
  width: 70vw;
  height: 70vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(closest-side, rgba(196, 154, 60, 0.10), rgba(196, 154, 60, 0) 70%);
  pointer-events: none;
  z-index: 0;
}
html[dir="rtl"] .glow { inset: -30vh auto auto -20vw; }

.top, .main, .foot { position: relative; z-index: 1; width: 100%; max-width: 980px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; }
.logo { height: 34px; width: auto; display: block; }
.logo-on-dark, html[data-theme="dark"] .logo-on-light { display: none; }
html[data-theme="dark"] .logo-on-dark { display: block; }
.lang {
  font: inherit; font-size: 14px; color: var(--fg); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.lang:hover { border-color: var(--gold); }
.lang:lang(ar) { font-family: 'Plex Arabic', sans-serif; }
.lang:lang(en) { font-family: 'Sora', sans-serif; }

.main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 56px; padding-bottom: 56px; }
.eyebrow {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin: 0 0 20px;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-text);
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 15px; }
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
h1 { margin: 0; font-size: clamp(34px, 6.4vw, 64px); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; max-width: 14ch; }
html[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.3; max-width: 16ch; }
.lead { margin: 22px 0 0; font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 60ch; }

.points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15px; }
.points li { display: inline-flex; align-items: center; gap: 10px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }

.card {
  margin-top: 44px; max-width: 560px; padding: 26px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow);
}
.card h2 { margin: 0; font-size: 20px; font-weight: 600; }
.muted { margin: 6px 0 18px; color: var(--muted); font-size: 15px; }
.fields { display: grid; gap: 10px; }
input[type="email"], textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--fg); background: var(--input);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; outline: none;
}
html[dir="rtl"] input[type="email"]:placeholder-shown, html[dir="rtl"] textarea:placeholder-shown { direction: rtl; text-align: right; }
input[type="email"]::placeholder, textarea::placeholder { color: var(--placeholder); }
input[type="email"]:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
button[type="submit"] {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--on-gold); background: var(--gold);
  border: 0; border-radius: 12px; padding: 13px 20px; cursor: pointer; white-space: nowrap; justify-self: start;
}
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
button[type="submit"]:hover { filter: brightness(0.95); }
button[type="submit"]:disabled { opacity: 0.6; cursor: progress; }
button:focus-visible, .lang:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.turnstile:empty { display: none; }
.turnstile { margin-top: 12px; }
.status { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; }
.status.ok { color: var(--gold-text); }
.status.err { color: var(--err); }
#waitlist.done .fields { display: none; }
.fine { margin: 6px 0 0; font-size: 12.5px; color: var(--faint); }

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

.foot {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 22px; padding-bottom: 28px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.sep { color: var(--gold); }
.legal { display: inline-flex; align-items: center; gap: 8px; }
.legal a { color: inherit; text-decoration: none; }
.legal a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.legal a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* Light, dark and system theme switch (theme.js) */
.foot-tools { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.theme { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.theme button {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent;
  border-radius: 999px; background: transparent; color: var(--faint); cursor: pointer;
}
.theme button:hover { color: var(--fg); }
.theme button[aria-pressed="true"] { color: var(--fg); border-color: var(--line); background: var(--card); }
.theme button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 560px) {
  .top { padding-top: 20px; }
  .logo { height: 24px; }
  .main { padding-top: 40px; padding-bottom: 40px; }
  button[type="submit"] { width: 100%; justify-self: stretch; }
  .card { padding: 20px; margin-top: 36px; }
  .top, .main, .foot { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .main > * { animation: rise 0.6s ease both; }
  .main > *:nth-child(2) { animation-delay: 0.05s; }
  .main > *:nth-child(3) { animation-delay: 0.1s; }
  .main > *:nth-child(4) { animation-delay: 0.15s; }
  .main > *:nth-child(5) { animation-delay: 0.2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Legal pages (/privacy, /terms, /data-deletion) ---------- */
.top .logo-link { display: inline-flex; }
.doc { position: relative; z-index: 1; width: 100%; max-width: 780px; margin: 0 auto; padding: 48px 24px 64px; flex: 1; }
.doc [lang="ar"] { display: none; }
html[lang="ar"] .doc [lang="en"] { display: none; }
html[lang="ar"] .doc [lang="ar"] { display: block; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; margin: 0; max-width: none; }
.doc .updated { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.doc .intro { margin: 22px 0 0; color: var(--muted); font-size: 17px; }
.doc h2 { margin: 38px 0 10px; font-size: 20px; font-weight: 600; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.75; }
.doc p { margin: 10px 0; }
.doc ul, .doc ol { margin: 10px 0; padding-inline-start: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--gold-text); text-underline-offset: 3px; }
.doc .toc { margin: 28px 0 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.doc .toc ol { margin: 0; columns: 2; column-gap: 28px; font-size: 14.5px; }
.doc .toc li { margin: 4px 0; break-inside: avoid; }
.doc .toc a { color: var(--fg); text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }
.doc .note { margin: 18px 0; padding: 14px 16px; border-inline-start: 3px solid var(--gold); background: var(--card); border-radius: 8px; }
@media (max-width: 560px) { .doc { padding: 32px 18px 48px; } .doc .toc ol { columns: 1; } }
