/* ===== Colors & fonts (change the brand here) ===== */
:root {
  --bg: oklch(15% .022 165);
  --card: oklch(20% .028 165);
  --secondary: oklch(25% .035 165);
  --text: oklch(96% .012 95);
  --muted: oklch(72% .03 150);
  --primary: oklch(82% .13 84);          /* gold */
  --primary-glow: oklch(90% .11 92);
  --primary-text: oklch(18% .03 165);
  --accent: oklch(72% .16 158);          /* green */
  --gain: oklch(78% .17 155);
  --border: oklch(82% .13 84 / .14);
  --error: oklch(68% .2 25);
  --gold: linear-gradient(135deg, var(--primary-glow), var(--primary) 55%, oklch(68% .12 70));
  --surface: linear-gradient(160deg, oklch(22% .03 165), oklch(17% .024 165));
  --hero-fade: linear-gradient(180deg, oklch(15% .022 165 / .15) 0%, oklch(15% .022 165 / .6) 55%, var(--bg) 100%);
  --cta-bg: radial-gradient(120% 120% at 50% 0%, oklch(32% .07 158) 0%, oklch(18% .03 165) 60%, var(--bg) 100%);
  --shadow-gold: 0 12px 40px -12px oklch(82% .13 84 / .55);
  --shadow: 0 20px 50px -25px oklch(0% 0 0 / .7);
  --font: "Tajawal", system-ui, sans-serif;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 52px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; }
main { min-height: 100vh; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 800; }
h2 { font-size: 1.875rem; line-height: 1.375; }
@media (min-width: 768px) { h2 { font-size: 2.25rem; } }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { max-width: 64rem; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 72rem; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container, .container-wide { padding: 0 32px; } }
.section { padding-top: 80px; padding-bottom: 80px; }
@media (min-width: 768px) { .section { padding-top: 112px; padding-bottom: 112px; } }
.section-head { max-width: 42rem; }
.section-head h2 { margin-top: 12px; }
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 700; }
.grid-3 { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.muted { color: var(--muted); }
.xs { font-size: .75rem; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.text-gold { background-image: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gain); animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 28px; border: 0; border-radius: 999px;
  font: 700 1rem var(--font); cursor: pointer; transition: transform .3s, border-color .15s, color .15s; }
.btn .arrow { width: 20px; height: 20px; transition: transform .3s; }
.btn:hover .arrow { transform: translateX(-4px); }
.btn-gold { background-image: var(--gold); color: var(--primary-text); box-shadow: var(--shadow-gold); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-gold:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-ghost { border: 1px solid oklch(96% .012 95 / .2); background: oklch(15% .022 165 / .4); color: var(--text); font-weight: 500;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-ghost:hover { border-color: oklch(82% .13 84 / .6); color: var(--primary); }

/* ===== Ticker ===== */
.ticker { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; height: 44px; overflow: hidden; border-bottom: 1px solid var(--border);
  background: oklch(15% .022 165 / .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ticker-label { position: relative; z-index: 1; display: flex; flex: none; align-items: center; gap: 8px; height: 100%; padding: 0 12px;
  border-inline-end: 1px solid var(--border); background: var(--secondary); color: var(--primary); font-size: .75rem; font-weight: 700; }
.ticker-label .muted { font-weight: 400; }
@media (min-width: 768px) { .ticker-label { padding: 0 16px; } }
.ticker-track { position: relative; flex: 1; height: 100%; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6% 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6% 94%, transparent); }
.ticker ul { display: flex; align-items: center; width: max-content; height: 100%; margin: 0; padding: 0; list-style: none; animation: ticker 200s linear infinite; }
.ticker li { display: flex; flex: none; align-items: center; gap: 8px; padding-inline-end: 32px; white-space: nowrap; font-size: .875rem; }
.ticker li svg { width: 16px; height: 16px; color: var(--gain); }
.ticker li b { font-weight: 700; }
.gold-num { color: var(--primary); font-weight: 700; }
.pill { padding: 2px 8px; border-radius: 999px; background: oklch(78% .17 155 / .15); color: var(--gain); font-size: .75rem; font-weight: 700; }
.ticker:hover ul { animation-play-state: paused; }
/* RTL list: moving right by half its width brings the copy into place, so the loop is seamless */
@keyframes ticker { to { transform: translateX(50%); } }

/* ===== Hero ===== */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(92svh, 980px); padding: 80px 0 64px; }
@media (min-width: 768px) { .hero { align-items: center; padding-bottom: 96px; } }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.hero-fade { position: absolute; inset: 0; z-index: -1; background-image: var(--hero-fade); }
.hero-grid { display: grid; gap: 40px; align-items: center; width: 100%; }
@media (min-width: 1024px) { .container.hero-grid { max-width: 76rem; grid-template-columns: 1fr 300px; gap: 56px; } }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid oklch(82% .13 84 / .3); border-radius: 999px;
  background: oklch(15% .022 165 / .5); color: var(--primary); font-size: .75rem; font-weight: 500; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (min-width: 768px) { .badge { font-size: .875rem; } }
.hero h1 { max-width: 48rem; margin-top: 24px; font-size: 2rem; line-height: 1.45; }
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; line-height: 1.35; } }
.lede { max-width: 42rem; margin-top: 20px; color: var(--muted); font-size: 1rem; line-height: 2rem; }
@media (min-width: 768px) { .lede { font-size: 1.125rem; line-height: 2.25rem; } }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }

.rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* portrait video (480×848): shown at its real shape so it stays sharp */
.hero-video { position: relative; width: 100%; max-width: 300px; margin: 0 auto; overflow: hidden; aspect-ratio: 480 / 848;
  border: 1px solid oklch(82% .13 84 / .35); border-radius: 1.5rem; background: #000; box-shadow: var(--shadow), 0 0 80px -20px oklch(82% .13 84 / .45); }
.hero-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.unmute { position: absolute; top: 14px; right: 14px; padding: 8px 14px; border: 0; border-radius: 999px; background-image: var(--gold); color: var(--primary-text);
  font: 700 .85rem var(--font); cursor: pointer; box-shadow: var(--shadow-gold); }

/* ===== Stats ===== */
.stats-wrap { position: relative; margin-top: -24px; }
.stats { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 1.5rem; background: var(--border); box-shadow: var(--shadow); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats > div { padding: 24px; background-image: var(--surface); }
@media (min-width: 768px) { .stats > div { padding: 32px; } }
.stat { font-size: 1.5rem; font-weight: 800; line-height: 1.4; }
@media (min-width: 768px) { .stat { font-size: 1.875rem; } }
.stats p { margin-top: 8px; color: var(--muted); font-size: .875rem; line-height: 1.75rem; }

/* ===== Story cards ===== */
.story { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--border); border-radius: 1.5rem; background-image: var(--surface); box-shadow: var(--shadow); }
.story-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 1rem;
  background: oklch(15% .022 165 / .6); }
.story-box > svg { flex: none; width: 24px; height: 24px; color: var(--gain); }
.story-box .end { text-align: left; }
.story-val { margin-top: 4px; font-size: 1.125rem; font-weight: 700; }
.quote { width: 28px; height: 28px; margin-top: 24px; color: oklch(82% .13 84 / .4); }
.story-text { flex: 1; margin-top: 8px; color: oklch(96% .012 95 / .9); font-size: .95rem; line-height: 2rem; }
.story-foot { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.avatar { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background-image: var(--gold); color: var(--primary-text);
  font-size: 1.125rem; font-weight: 700; }
.story-name { font-weight: 700; }
.demo-tag { margin-inline-start: auto; padding: 2px 10px; border: 1px dashed oklch(82% .13 84 / .4); border-radius: 999px; color: var(--muted); font-size: .7rem; white-space: nowrap; }

/* ===== Features ===== */
.band { border-block: 1px solid var(--border); background: oklch(25% .035 165 / .4); }
.feature { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: 1.5rem; background-image: var(--surface); transition: border-color .15s; }
.feature:hover { border-color: oklch(82% .13 84 / .4); }
.feature-num { position: absolute; top: 24px; left: 24px; color: oklch(96% .012 95 / .05); font-size: 3rem; font-weight: 800; line-height: 1; }
.icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 1rem; background: oklch(82% .13 84 / .1); color: var(--primary); }
.icon svg { width: 24px; height: 24px; }
.feature h3 { margin-top: 24px; font-size: 1.25rem; font-weight: 700; line-height: 1.375; }
.feature p { margin-top: 12px; color: var(--muted); line-height: 2rem; }

/* ===== CTA ===== */
.cta-wrap { padding: 80px 20px; }
@media (min-width: 768px) { .cta-wrap { padding: 112px 32px; } }
.cta { max-width: 56rem; margin: 0 auto; padding: 56px 24px; overflow: hidden; border: 1px solid oklch(82% .13 84 / .25); border-radius: 2rem;
  background-image: var(--cta-bg); box-shadow: var(--shadow); text-align: center; }
@media (min-width: 768px) { .cta { padding: 80px 56px; } }
.cta h2 { line-height: 1.5; }
@media (min-width: 768px) { .cta h2 { font-size: 3rem; line-height: 1.4; } }
.cta p { max-width: 42rem; margin: 20px auto 0; color: var(--muted); line-height: 2rem; }
@media (min-width: 768px) { .cta p { font-size: 1.125rem; line-height: 2.25rem; } }
.cta .btn { margin-top: 36px; }

/* ===== Footer ===== */
.site-footer { padding: 32px 20px 96px; border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; line-height: 1.5rem; text-align: center; }
.site-footer p { max-width: 48rem; margin: 0 auto; }
.site-footer p + p { margin-top: 8px; }
@media (min-width: 768px) { .site-footer { padding: 32px; } }
.floating-cta { position: fixed; bottom: 20px; left: 20px; z-index: 40; padding: 12px 22px; border-radius: 999px; background-image: var(--gold);
  color: var(--primary-text); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow-gold); }
@media (min-width: 768px) { .floating-cta { display: none; } }

/* ===== Lead form popup ===== */
.modal { width: min(40rem, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 32px 20px 24px; overflow-y: auto; border: 1px solid oklch(82% .13 84 / .25);
  border-radius: 1.5rem; background: var(--card); background-image: var(--cta-bg); color: var(--text); box-shadow: var(--shadow); }
@media (min-width: 640px) { .modal { padding: 40px 36px 32px; } }
.modal::backdrop { background: oklch(10% .02 165 / .75); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
.modal h2 { font-size: 1.6rem; text-align: center; }
.modal-sub { margin: 10px 0 24px; line-height: 1.8; text-align: center; }
.modal-close { position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%;
  background: oklch(15% .022 165 / .6); color: var(--muted); font: 1.4rem/1 var(--font); cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal .submit { width: 100%; margin-bottom: 12px; }

.fields { display: grid; gap: 16px; margin-bottom: 24px; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .field.full { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 700; }
.field input:not([type=checkbox]) { width: 100%; padding: 13px 16px; border: 1px solid oklch(82% .13 84 / .2); border-radius: 12px;
  background: oklch(15% .022 165 / .7); color: var(--text); font: 1rem var(--font); outline: none; transition: border-color .15s; }
.field input[dir=ltr] { text-align: right; }
.field input:focus { border-color: var(--primary); }
.field.invalid input { border-color: var(--error); }
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field legend { margin-bottom: 8px; padding: 0; font-size: .875rem; font-weight: 700; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; align-items: center; justify-content: center; height: 100%; padding: 12px 6px; border: 1px solid oklch(82% .13 84 / .2); border-radius: 12px;
  background: oklch(15% .022 165 / .7); color: var(--muted); font-size: .875rem; font-weight: 500; text-align: center; transition: border-color .15s, color .15s, background .15s; }
.choice:hover span { color: var(--text); }
.choice input:checked + span { border-color: var(--primary); background: oklch(82% .13 84 / .12); color: var(--primary); font-weight: 700; }
.choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.field.invalid .choice span { border-color: var(--error); }
.consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--muted); cursor: pointer; line-height: 1.7; }
.consent input { margin-top: 3px; accent-color: var(--primary); width: 18px; height: 18px; flex: none; }
.err-msg { display: block; margin-top: 4px; color: var(--error); font-size: .8rem; }
.err-msg:empty { display: none; }
.alert { margin-bottom: 20px; padding: 14px 18px; border-radius: 12px; background: oklch(62% .22 25 / .12); border: 1px solid oklch(62% .22 25 / .4); color: var(--error); font-size: .9rem; }
.alert ul { margin: 6px 0 0; padding-inline-start: 18px; }
.alert ul:empty { display: none; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* hidden without widening the RTL page */
.spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.is-submitting .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .dot, .spinner, .ticker ul, .modal[open] { animation: none; }
  .btn, .btn .arrow { transition: none; }
}
