/* ===== Colors & fonts (change the brand here) ===== */
:root {
  --bg: oklch(100% 0 0);
  --text: oklch(23.9% 0 0);
  --muted: oklch(49.8% .011 258.4);
  --primary: oklch(67.5% .142 234.3);    /* sky blue */
  --navy: oklch(37.8% .182 262.5);
  --green: oklch(73.1% .192 128.2);
  --gain: oklch(58% .17 145);
  --secondary: oklch(96% .014 224.5);
  --border: oklch(91% .01 230);
  --input-border: oklch(88% .012 230);
  --error: oklch(58% .21 25);
  --hero-bg: oklch(22% .09 262);
  --hero-muted: oklch(90% .02 230);
  --brand: linear-gradient(120deg, var(--navy), var(--primary) 50%, var(--green));
  --hero-text: linear-gradient(120deg, var(--primary), var(--green));
  --panel: linear-gradient(160deg, oklch(100% 0 0), oklch(97.5% .008 224.5));
  --hero-fade: linear-gradient(270deg, oklch(22% .09 262 / .9) 0%, oklch(25% .1 262 / .5) 60%, oklch(25% .1 262 / .15) 100%),
               linear-gradient(transparent 70%, oklch(22% .09 262 / .6) 100%);
  --shadow-panel: 0 24px 50px -30px oklch(37.8% .182 262.5 / .35);
  --shadow-brand: 0 18px 40px -18px oklch(67.5% .142 234.3 / .6);
  --font: "Tajawal", system-ui, sans-serif;
  --font-display: "Cairo", "Tajawal", system-ui, sans-serif;
}

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

.container { max-width: 72rem; margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 20px; }
.section-sm { padding: 64px 20px; }
.section.container, .section-sm.container { padding-inline: 20px; }
.section-head { max-width: 42rem; margin: 0 auto; text-align: center; }
.section-head h2 { margin-top: 8px; }
.section-head p { margin-top: 12px; color: var(--muted); }
.eyebrow { color: var(--primary); font-size: .875rem; }
.grid-3 { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.panel { border: 1px solid var(--border); border-radius: 26px; background-image: var(--panel); box-shadow: var(--shadow-panel); }

.center { text-align: center; }
.muted { color: var(--muted); }
.xs { font-size: .75rem; }
.sm { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.gain { color: var(--gain); }
.text-brand, .text-hero { -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-brand { background-image: var(--brand); }
.text-hero { background-image: var(--hero-text); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border: 0; border-radius: 18px;
  font: 700 1rem var(--font); cursor: pointer; transition: transform .25s, opacity .15s, background-color .15s; }
.btn-brand { background-image: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-brand:hover { transform: translateY(-2px); }
.btn-brand:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-glass { border: 1px solid oklch(100% 0 0 / .3); background: oklch(100% 0 0 / .1); color: #fff; font-weight: 500;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { background: oklch(100% 0 0 / .18); }
.btn-sm { min-height: 34px; padding: 0 16px; border-radius: 999px; font-size: .75rem; }
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 760px; overflow: hidden; background: var(--hero-bg); color: #fff; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-fade { position: absolute; inset: 0; z-index: -1; background-image: var(--hero-fade); }
@media (max-width: 767px) { .hero-fade { background-image: linear-gradient(180deg, oklch(22% .09 262 / .7), oklch(22% .09 262 / .92)); } }
.site-header { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-block: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background-image: var(--brand); font-size: 1.1rem; }
.hero-body { width: 100%; padding-top: 72px; padding-bottom: 112px; }
.hero-text { max-width: 40rem; }

/* Hero is two columns on desktop: text (right, RTL) + video (left). Stacked on phones. */
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) {
  .container.hero-grid { max-width: 80rem; grid-template-columns: 1fr 1fr; gap: 48px; }
  .site-header.container { max-width: 80rem; } /* lines up with the wider hero */
}
.hero-media { width: 100%; max-width: 40rem; }
@media (max-width: 1023px) { .hero-media { margin-inline: auto; } }
.hero-media .video { position: relative; margin: 0; border: 1px solid oklch(100% 0 0 / .25); box-shadow: 0 30px 60px -20px oklch(10% .05 262 / .7); }
.hero-media .video video { aspect-ratio: 16 / 9; object-fit: cover; }
.hero-media .video-empty { border: 2px dashed oklch(100% 0 0 / .35); background: oklch(100% 0 0 / .08); color: var(--hero-muted);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-media .video-empty svg { color: #fff; }
.yt { position: relative; aspect-ratio: 16 / 9; }
.yt img, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; border: 0; background: oklch(15% .05 262 / .25); cursor: pointer; transition: background .2s; }
.yt-play:hover { background: oklch(15% .05 262 / .1); }
.yt-play svg { width: 76px; height: 76px; padding: 20px 18px 20px 22px; border-radius: 50%; background-image: var(--brand); color: #fff; fill: #fff; stroke: none;
  box-shadow: var(--shadow-brand); transition: transform .2s; }
.yt-play:hover svg { transform: scale(1.08); }
/* Portrait (phone) video: tall frame instead of 16:9 */
.hero-grid--tall .hero-media { max-width: 320px; }
.hero-grid--tall .hero-media .video video { aspect-ratio: 480 / 848; max-height: none; }
.hero-grid--tall .unmute { top: auto; right: 50%; bottom: 64px; transform: translateX(50%); white-space: nowrap; } /* keeps the video's own title at the top visible */
@media (min-width: 1024px) { .container.hero-grid--tall { grid-template-columns: 1fr 320px; gap: 72px; } }
.video-caption { margin-top: 12px; color: var(--hero-muted); font-size: .875rem; text-align: center; }
.unmute { position: absolute; top: 12px; right: 12px; padding: 8px 14px; border: 0; border-radius: 999px; background-image: var(--brand); color: #fff;
  font: 700 .8rem var(--font); cursor: pointer; box-shadow: var(--shadow-brand); }
.unmute[hidden] { display: none; }
.badge { display: inline-flex; padding: 6px 16px; border: 1px solid oklch(100% 0 0 / .3); border-radius: 999px; background: oklch(100% 0 0 / .1); font-size: .875rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero h1 { margin-top: 24px; font-size: 2.25rem; line-height: 1.25; }
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; line-height: 1.15; } }
.lede { margin-top: 24px; color: var(--hero-muted); font-size: 1.125rem; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--hero-muted); font-size: .875rem; }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks svg { width: 16px; height: 16px; color: var(--green); }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }

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

/* ===== Stats (overlaps the hero) ===== */
.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: -56px; padding: 24px; text-align: center; background: #fff; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); padding: 28px 32px; } }
.stats b { display: block; font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; line-height: 1.3; }
.stats span { color: var(--muted); font-size: .8rem; }

/* ===== Why cards ===== */
.card { padding: 28px; }
.card-icon { width: 32px; height: 32px; color: var(--primary); }
.card h3 { margin-top: 16px; }
.card p { margin-top: 8px; color: var(--muted); font-size: .9rem; }

/* ===== Video ===== */
.video { max-width: 52rem; margin: 40px auto 0; overflow: hidden; border-radius: 26px; background: #000; box-shadow: var(--shadow-panel); }
.video video { display: block; width: 100%; max-height: 80vh; }
.video-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 16 / 9;
  border: 2px dashed oklch(67.5% .142 234.3 / .4); background: var(--secondary); color: var(--muted); box-shadow: none; }
.video-empty svg { width: 48px; height: 48px; color: var(--primary); }

/* ===== Calculator ===== */
.calc { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 1024px) { .calc { grid-template-columns: 2fr 3fr; align-items: start; } }
.calc-inputs, .calc-result { padding: 24px; }
@media (min-width: 768px) { .calc-inputs, .calc-result { padding: 32px; } }
.calc-inputs { display: grid; gap: 28px; }
.ctrl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ctrl-head label, .ctrl-label { color: var(--muted); font-size: .875rem; }
.ctrl-head output { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }

input[type=range] { --p: 50%; width: 100%; height: 20px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px;
  background: linear-gradient(to left, var(--primary) var(--p), var(--secondary) var(--p)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--secondary); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--primary); }
input[type=range]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; border: 2px solid var(--primary); border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-brand); -webkit-appearance: none; appearance: none; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid var(--primary); border-radius: 50%; background: #fff; }

.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.style-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border: 1px solid var(--border); border-radius: 18px;
  background: oklch(96% .014 224.5 / .4); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.style-btn b { font-family: var(--font-display); font-size: 1rem; }
.style-btn small { color: var(--muted); font-size: .7rem; }
.style-btn:hover { border-color: oklch(67.5% .142 234.3 / .4); }
.style-btn.active { border-color: var(--primary); background: oklch(67.5% .142 234.3 / .1); box-shadow: var(--shadow-brand); }
.style-btn.active b { color: var(--primary); }
.style-desc { margin-top: 10px; color: var(--muted); font-size: .75rem; }

.calc-result { display: flex; flex-direction: column; gap: 20px; }
.total { margin-top: -12px; font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1.25; text-align: right; }
@media (min-width: 768px) { .total { font-size: 3.75rem; } }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini { padding: 16px; border-radius: 22px; background: oklch(96% .014 224.5 / .5); }
.mini span { display: block; color: var(--muted); font-size: .75rem; }
.mini b { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 1.25rem; text-align: right; }
.chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: 200px; }
#area-total { stroke: none; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.line-total { fill: none; stroke: var(--primary); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.line-dep { fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.x-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: .7rem; }

/* ===== Steps ===== */
.step { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: 26px; }
.step-num { position: absolute; top: 16px; left: 24px; color: oklch(67.5% .142 234.3 / .2); font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1; }
.step-icon { width: 28px; height: 28px; color: var(--primary); }
.step h3 { margin-top: 16px; }
.step p { margin-top: 8px; color: var(--muted); font-size: .9rem; }

/* ===== Lead form ===== */
.form-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .form-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
@media (min-width: 768px) { .form-intro h2 { font-size: 3rem; line-height: 1.25; } }
.form-intro p { margin-top: 20px; color: var(--muted); font-size: 1.05rem; }
.form-card { padding: 24px; }
@media (min-width: 768px) { .form-card { padding: 32px; } }
.goal { margin-bottom: 20px; color: var(--muted); font-size: .875rem; }
.goal b { font-weight: 700; }
.goal #goal-months { color: var(--primary); }

.fields { display: grid; gap: 16px; margin-bottom: 20px; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .field.full { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 500; }
.field input:not([type=checkbox]) { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--input-border); border-radius: 18px;
  background: oklch(96% .014 224.5 / .5); color: var(--text); font: .95rem var(--font); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input[dir=ltr] { text-align: right; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px oklch(67.5% .142 234.3 / .15); }
.field.invalid input { border-color: var(--error); }

/* Phone country dropdown (intl-tel-input) */
.iti:not(.iti--container) { display: block; width: 100%; }
.iti { direction: ltr; }
.iti input[type=tel] { text-align: left; }
.iti__selected-country { border-radius: 18px 0 0 18px; }
.iti__country-list { min-width: 260px; }
.iti__country-name { white-space: nowrap; }
.iti__selected-dial-code { direction: ltr; color: var(--text); font-size: .95rem; }
.iti__dropdown-content { border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-panel); overflow: hidden; }
.iti__search-input { flex-shrink: 0; height: 44px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--border); direction: rtl; text-align: right; font: .95rem var(--font); outline: none; }
.iti__country { direction: rtl; font-family: var(--font); }
.iti__dial-code { direction: ltr; unicode-bidi: isolate; }
.consent { display: flex !important; gap: 10px; align-items: center; margin: 0 !important; color: var(--muted); font-weight: 400 !important; cursor: pointer; }
.consent input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.err-msg { display: block; margin-top: 4px; color: var(--error); font-size: .8rem; }
.err-msg:empty { display: none; }
.alert { margin-bottom: 16px; padding: 12px 16px; border: 1px solid oklch(58% .21 25 / .35); border-radius: 16px; background: oklch(58% .21 25 / .07); color: var(--error); font-size: .9rem; }
.alert ul { margin: 6px 0 0; padding-inline-start: 18px; }
.alert ul:empty { display: none; }
.lock { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }
.lock svg { width: 14px; height: 14px; }
.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); } }

/* ===== FAQ ===== */
.faq { display: grid; gap: 12px; max-width: 46rem; margin: 32px auto; }
.faq details { border: 1px solid var(--border); border-radius: 18px; background: oklch(96% .014 224.5 / .3); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 20px 16px; color: var(--muted); font-size: .9rem; }

/* ===== Footer ===== */
.site-footer { padding-block: 40px 96px; border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; text-align: center; max-width: none; }
.site-footer p { max-width: 64rem; margin: 0 auto; }
.site-footer p + p { margin-top: 12px; }
@media (min-width: 768px) { .site-footer { padding-bottom: 40px; } }
.floating-cta { position: fixed; bottom: 16px; left: 16px; z-index: 40; padding: 12px 22px; border-radius: 16px; background-image: var(--brand); color: #fff;
  font-weight: 700; font-size: .9rem; box-shadow: var(--shadow-brand); }
@media (min-width: 768px) { .floating-cta { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .spinner { animation: none; }
  .btn { transition: none; }
}
