/* Qisti landing pages. Every value resolves through the landing-page-design skill:
   Tailwind type scale + named text styles, the spacing table, Tailwind radii,
   flat backgrounds, one base easing curve. */

/* ---------- font (self-hosted: no third-party requests) ----------
   Readex Pro: one family drawn for Arabic and Latin together, so both scripts share
   weight and rhythm. Weights 400 / 500 / 600 only (the skill caps at semibold). */
@font-face { font-family: "Readex Pro"; src: url("../fonts/readex-pro-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; 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: "Readex Pro"; src: url("../fonts/readex-pro-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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: "Readex Pro"; src: url("../fonts/readex-pro-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; 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: "Readex Pro"; src: url("../fonts/readex-pro-arabic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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: "Readex Pro"; src: url("../fonts/readex-pro-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; 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: "Readex Pro"; src: url("../fonts/readex-pro-arabic-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }

/* ---------- tokens ---------- */
:root {
  /* spacing (skill B2): nothing between, nothing outside */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
  /* radius (Tailwind) */
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;
  /* colour: flat, light theme */
  --bg: #FAFAF7; --surface: #FFFFFF; --ink: #0B1210; --ink-2: #39423E; --muted: #5C6661;
  --line: #E4E6E1; --green: #0C6B4E; --green-ink: #08503A; --green-soft: #E8F3EE; --green-light: #A7DCC6;
  --error: #B3261E; --error-soft: #FBE9E7;
  --dark: #131209; /* skill B4 dark background */
  /* motion (skill B7) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-move: 500ms; --t-fade: 300ms;
  --font: "Readex Pro", system-ui, sans-serif;
}

/* ---------- named text styles (skill B1) ---------- */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.025em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.01em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-2 { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }
/* Arabic sets taller: same scale step, more room inside it is not allowed, so Arabic
   headings use the line height of the step and gain air from spacing instead. */

@media (max-width: 767px) {
  /* On phones each heading steps down the same scale; still named styles, still on scale. */
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 30px; line-height: 36px; }
  .heading-3 { font-size: 30px; line-height: 36px; }
  .heading-4 { font-size: 24px; line-height: 32px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 24px; background: var(--bg); overflow-x: hidden; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--green-light); }
.muted { color: var(--muted); }
.container { width: 100%; max-width: 1152px; margin-inline: auto; padding-inline: var(--s-300); }
@media (max-width: 767px) { .container { padding-inline: var(--s-200); } }
.stack-75 > * + * { margin-top: var(--s-75); }
.stack-200 > * + * { margin-top: var(--s-200); }
.stack-300 > * + * { margin-top: var(--s-300); }
.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }
.icon-20 { width: 20px; height: 20px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: var(--r-md); }

.skip { position: absolute; inset-inline-start: var(--s-200); top: var(--s-200); z-index: 100; background: var(--ink); color: #fff; padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); transform: translateY(-200%); transition: transform var(--t-move) var(--ease); }
.skip:focus { transform: translateY(0); }

/* ---------- buttons (skill B2: 8px / 12px) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75); padding: var(--s-75) var(--s-100); border-radius: var(--r-full); border: 1px solid transparent; text-decoration: none; cursor: pointer; font-family: inherit; white-space: nowrap; transition: background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease), transform var(--t-move) var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-ink); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn-lg { padding: var(--s-100) var(--s-300); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn .arrow { transition: transform var(--t-move) var(--ease); }
.btn:hover .arrow { transform: translateX(var(--s-50)); }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(var(--s-50)); }

/* ---------- floating nav (skill B7) ---------- */
.nav-wrap { position: fixed; inset-inline: 0; top: var(--s-200); z-index: 50; display: flex; justify-content: center; padding-inline: var(--s-200); pointer-events: none; }
.nav { pointer-events: auto; display: flex; align-items: center; gap: var(--s-300); padding: var(--s-75) var(--s-75); padding-inline-start: var(--s-200); background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border: 1px solid rgba(11, 18, 16, 0.08); border-radius: var(--r-full); max-width: 100%; }
.brand { display: inline-flex; align-items: center; gap: var(--s-75); text-decoration: none; color: var(--ink); }
.brand svg { width: 28px; height: 28px; }
.brand .word { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: var(--s-50); list-style: none; padding: 0; }
.nav-links a { display: block; padding: var(--s-75) var(--s-100); border-radius: var(--r-full); text-decoration: none; color: var(--ink-2); transition: background-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease); }
.nav-links a:hover { background: rgba(11, 18, 16, 0.05); color: var(--ink); }
.nav-links a[aria-current="true"] { background: var(--green-soft); color: var(--green-ink); }
.nav-actions { display: flex; align-items: center; gap: var(--s-75); }
.lang { min-width: 40px; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; inset-inline-start: 12px; width: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform var(--t-move) var(--ease), opacity var(--t-fade) var(--ease); }
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 23px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 40; background: rgba(250, 250, 247, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); padding: var(--s-900) var(--s-300) var(--s-400); display: flex; flex-direction: column; gap: var(--s-75); opacity: 0; pointer-events: none; transition: opacity var(--t-fade) var(--ease); }
.mobile-menu a { text-decoration: none; padding: var(--s-100) 0; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(var(--s-300)); transition: opacity var(--t-move) var(--ease), transform var(--t-move) var(--ease); }
.mobile-menu .btn { margin-top: var(--s-300); opacity: 0; transform: translateY(var(--s-300)); transition: opacity var(--t-move) var(--ease), transform var(--t-move) var(--ease); }
.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.menu-open .mobile-menu a, .menu-open .mobile-menu .btn { opacity: 1; transform: none; }
@media (max-width: 899px) {
  .nav-links, .nav-actions .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .nav { gap: var(--s-200); }
}
@media (min-width: 900px) { .mobile-menu { display: none; } }

/* ---------- sections ---------- */
section { padding-block: var(--s-900); }
@media (max-width: 767px) { section { padding-block: var(--s-700); } }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--green-ink); }
.section-head { max-width: 680px; }
.section-head p { margin-top: var(--s-200); color: var(--ink-2); }

/* hero */
/* main clears the fixed nav (80); each page section keeps its own token padding */
main { padding-top: var(--s-800); }
.hero { padding-top: var(--s-900); padding-bottom: var(--s-900); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 376px); gap: var(--s-600); align-items: center; }
/* Two columns only where the text column reaches 680px, so headlines break where the copy breaks. */
@media (max-width: 1199px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s-600); } .hero-grid > .card { max-width: 480px; } }
@media (max-width: 959px) { .hero { padding-top: var(--s-600); } }
/* Gradient text is clipped to the element box; the bottom padding gives Arabic descenders (ج ي ق) room to paint. */
.hero h1 { max-width: 680px; padding-bottom: var(--s-200); background: linear-gradient(to right, #000000, #666666); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir="rtl"] .hero h1 { background-image: linear-gradient(to left, #000000, #666666); }
.hero .lead { max-width: 680px; margin-top: var(--s-300); color: var(--ink-2); }
.hero-cta { margin-top: var(--s-400); display: flex; flex-wrap: wrap; gap: var(--s-200); align-items: center; }
.proof { margin-top: var(--s-400); display: flex; flex-wrap: wrap; gap: var(--s-75); list-style: none; padding: 0; }
.proof li { display: inline-flex; align-items: center; gap: var(--s-50); padding: var(--s-50) var(--s-100); border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.proof .icon { width: 16px; height: 16px; color: var(--green); }

/* card shells; inner radius follows outer minus gap */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-300); }
.card-inner { border-radius: var(--r-lg); } /* 24 outer - 16 gap = 8 */

/* calculator (buyers hero visual) */
.calc { padding: var(--s-300); box-shadow: 0 24px 48px rgba(11, 18, 16, 0.08); }
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-200); }
.calc label { display: block; color: var(--ink-2); }
.field { margin-top: var(--s-200); }
.input-wrap { margin-top: var(--s-75); display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg); transition: border-color var(--t-fade) var(--ease); }
.input-wrap:focus-within { border-color: var(--green); }
.input-wrap input, .input-wrap select { flex: 1; min-width: 0; border: 0; background: transparent; padding: var(--s-100) var(--s-200); font: inherit; color: var(--ink); outline: none; }
.input-wrap .unit { padding-inline: var(--s-200); color: var(--muted); }
.pills { margin-top: var(--s-75); display: flex; flex-wrap: wrap; gap: var(--s-75); }
.pill { padding: var(--s-50) var(--s-100); border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font: inherit; transition: background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease); }
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.result { margin-top: var(--s-300); padding: var(--s-200); border-radius: var(--r-lg); background: var(--green-soft); }
.result .amount { color: var(--green-ink); font-variant-numeric: tabular-nums; transition: opacity var(--t-fade) var(--ease); }
.result.is-blocked { background: var(--error-soft); }
.result.is-blocked .amount { color: var(--error); }
.calc .fine { margin-top: var(--s-200); color: var(--muted); }

/* problem → solution */
.compare { margin-top: var(--s-600); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-300); }
@media (max-width: 767px) { .compare { grid-template-columns: 1fr; } }
.compare .card ul { margin-top: var(--s-200); padding: 0; list-style: none; }
.compare .card li { display: flex; gap: var(--s-100); padding-block: var(--s-75); color: var(--ink-2); }
.compare .card li .icon { width: 20px; height: 20px; margin-top: var(--s-25); }
.compare .before .icon { color: var(--muted); }
.compare .after { background: var(--green-soft); border-color: transparent; }
.compare .after .icon { color: var(--green); }

/* benefits */
.benefits { margin-top: var(--s-600); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-300); list-style: none; padding: 0; }
@media (max-width: 959px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .benefits { grid-template-columns: 1fr; } }
.benefits .card { transition: transform var(--t-move) var(--ease), border-color var(--t-fade) var(--ease); }
.benefits .card:hover { transform: translateY(calc(var(--s-50) * -1)); border-color: var(--green-light); }
.benefit-icon { width: 48px; height: 48px; border-radius: var(--r-xl); background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.benefits h3 { margin-top: var(--s-300); }
.benefits p { margin-top: var(--s-75); color: var(--ink-2); }

/* tagline reveal (skill B11) on the warm dark background */
.tagline { background: var(--dark); color: #fff; }
.tagline p { max-width: 680px; margin-inline: auto; text-align: center; }
.tagline .w { color: rgba(255, 255, 255, 0.3); transition: color 700ms var(--ease); }
.tagline .w.on { color: #fff; }

/* steps */
.steps { margin-top: var(--s-600); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-300); list-style: none; padding: 0; counter-reset: step; }
@media (max-width: 899px) { .steps { grid-template-columns: 1fr; } }
.steps .card { position: relative; }
.step-no { width: 40px; height: 40px; border-radius: var(--r-full); background: var(--ink); color: #fff; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.steps h3 { margin-top: var(--s-300); }
.steps p { margin-top: var(--s-75); color: var(--ink-2); }

/* Murabaha flow */
.flow { margin-top: var(--s-600); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-200); list-style: none; padding: 0; }
@media (max-width: 899px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 499px) { .flow { grid-template-columns: 1fr; } }
.flow li { position: relative; display: flex; flex-direction: column; gap: var(--s-100); padding: var(--s-300); border-radius: var(--r-2xl); background: var(--surface); border: 1px solid var(--line); }
.flow .who { color: var(--green-ink); }
.flow .icon { color: var(--green); }
.rules { margin-top: var(--s-400); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-75) var(--s-300); list-style: none; padding: 0; }
@media (max-width: 767px) { .rules { grid-template-columns: 1fr; } }
.rules li { display: flex; gap: var(--s-100); align-items: flex-start; padding-block: var(--s-75); color: var(--ink-2); }
.rules .icon { width: 20px; height: 20px; color: var(--green); margin-top: var(--s-25); }

/* proof placeholders: clearly marked, never presented as real */
.quotes { margin-top: var(--s-600); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-300); list-style: none; padding: 0; }
@media (max-width: 767px) { .quotes { grid-template-columns: 1fr; } }
.placeholder { border: 1px dashed #B9C0BC; background: transparent; }
.placeholder .tag { display: inline-block; padding: var(--s-25) var(--s-75); border-radius: var(--r-full); background: #F0F1EC; color: var(--muted); }
.placeholder blockquote { margin: var(--s-200) 0 0; color: var(--muted); }

/* FAQ */
.faq { margin-top: var(--s-600); max-width: 768px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-300); padding-block: var(--s-300); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 20px; height: 20px; color: var(--muted); transition: transform var(--t-move) var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .answer { padding-bottom: var(--s-300); color: var(--ink-2); max-width: 680px; }

/* final CTA + form */
.final { background: var(--surface); border-top: 1px solid var(--line); }
.final-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: var(--s-700); align-items: start; }
@media (max-width: 959px) { .final-grid { grid-template-columns: 1fr; gap: var(--s-500); } }
.reassure { margin-top: var(--s-400); display: grid; gap: var(--s-100); list-style: none; padding: 0; }
.reassure li { display: flex; gap: var(--s-100); align-items: flex-start; color: var(--ink-2); }
.reassure .icon { width: 20px; height: 20px; color: var(--green); margin-top: var(--s-25); }
form .field:first-of-type { margin-top: 0; }
.error-text { margin-top: var(--s-50); color: var(--error); min-height: 0; }
.error-text:empty { display: none; }
.has-error .input-wrap { border-color: var(--error); }
.check { margin-top: var(--s-200); display: flex; gap: var(--s-100); align-items: flex-start; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: var(--s-25) 0 0; accent-color: var(--green); flex: none; }
form .btn { margin-top: var(--s-300); width: 100%; }
.btn.is-loading { position: relative; color: transparent; }
.btn.is-loading::after { content: ""; position: absolute; inset-block: calc(50% - 4px); inset-inline: 30%; border-radius: var(--r-full); background: rgba(255, 255, 255, 0.45); animation: shimmer 1200ms var(--ease) infinite; }
@keyframes shimmer { 0% { opacity: 0.35; transform: scaleX(0.6); } 50% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0.35; transform: scaleX(0.6); } }
.success { display: none; padding: var(--s-300); border-radius: var(--r-2xl); background: var(--green-soft); color: var(--green-ink); }
.is-done form { display: none; }
.is-done .success { display: block; }

/* merchant payouts preview (merchants hero visual) */
.payouts { padding: var(--s-300); box-shadow: 0 24px 48px rgba(11, 18, 16, 0.08); }
.payout-total { margin-top: var(--s-200); padding: var(--s-200); border-radius: var(--r-lg); background: var(--green-soft); }
.payout-total .amount { color: var(--green-ink); font-variant-numeric: tabular-nums; }
.orders { margin-top: var(--s-200); list-style: none; padding: 0; }
.orders li { display: grid; grid-template-columns: 40px 1fr auto; gap: var(--s-100); align-items: center; padding-block: var(--s-100); border-bottom: 1px solid var(--line); }
.orders li:last-child { border-bottom: 0; }
.orders .thumb { width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; color: var(--green); }
.orders .thumb .icon { width: 20px; height: 20px; }
.orders .num { font-variant-numeric: tabular-nums; text-align: end; }
.chip { display: inline-block; padding: var(--s-25) var(--s-75); border-radius: var(--r-full); }
.chip.paid { background: var(--green-soft); color: var(--green-ink); }
.chip.wait { background: #F0F1EC; color: var(--muted); }

/* footer */
footer { padding-block: var(--s-600); border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-300); align-items: center; }
.foot nav ul { display: flex; flex-wrap: wrap; gap: var(--s-300); list-style: none; padding: 0; }
.foot a { text-decoration: none; color: var(--ink-2); transition: color var(--t-fade) var(--ease); }
.foot a:hover { color: var(--ink); }
.legal { margin-top: var(--s-300); color: var(--muted); max-width: 768px; }

/* simple pages (privacy, terms, 404) */
.page { padding-top: var(--s-900); min-height: 70vh; }
.page .prose { max-width: 680px; }
.page .prose h2 { margin-top: var(--s-500); }
.page .prose p { margin-top: var(--s-200); color: var(--ink-2); }
.page .bilingual { margin-top: var(--s-600); padding-top: var(--s-600); border-top: 1px solid var(--line); }

/* ---------- scroll reveal (skill B7) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(var(--s-400)); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js [data-reveal] { transform: none; transition: opacity var(--t-fade) var(--ease); }
  .btn, .benefits .card, .btn .arrow, .faq summary .icon, .mobile-menu a, .mobile-menu .btn, .menu-toggle span { transition-property: opacity, color, background-color, border-color; }
  .btn-primary:hover, .benefits .card:hover { transform: none; }
  .tagline .w { transition: none; color: #fff; }
}

/* =====================================================================
   Motion and polish (upgrade). transform and opacity only, base curve,
   everything stops under prefers-reduced-motion.
   ===================================================================== */

/* hero: the copy enters line by line, the visual a beat later */
@keyframes intro { from { opacity: 0; transform: translateY(var(--s-300)); } to { opacity: 1; transform: none; } }
.js .intro > *, .js .hero-visual { opacity: 0; animation: intro 800ms var(--ease) forwards; }
.js .intro > :nth-child(2) { animation-delay: 90ms; }
.js .intro > :nth-child(3) { animation-delay: 180ms; }
.js .intro > :nth-child(4) { animation-delay: 270ms; }
.js .intro > :nth-child(5) { animation-delay: 360ms; }
.js .hero-visual { animation-delay: 240ms; }
.js .hero-visual .orders li { opacity: 0; animation: intro 600ms var(--ease) forwards; }
.js .hero-visual .orders li:nth-child(1) { animation-delay: 520ms; }
.js .hero-visual .orders li:nth-child(2) { animation-delay: 620ms; }
.js .hero-visual .orders li:nth-child(3) { animation-delay: 720ms; }
.js .hero-visual .orders li:nth-child(4) { animation-delay: 820ms; }

/* staggered grids: each card waits a beat after the one before (--d set in the HTML) */
.js [data-reveal].in { transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].in.settled { transition-delay: 0ms; }
.benefits .card.in:hover, .trust .card.in:hover { transform: translateY(calc(var(--s-50) * -1)); border-color: var(--green-light); }
.benefits .card .benefit-icon { transition: transform var(--t-move) var(--ease); }
.benefits .card:hover .benefit-icon { transform: translateY(calc(var(--s-25) * -1)) scale(1.05); }

/* floating nav firms up after the first scroll */
.nav { position: relative; }
.nav::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 12px 32px rgba(11, 18, 16, 0.10); opacity: 0; transition: opacity var(--t-fade) var(--ease); pointer-events: none; }
.nav.scrolled::after { opacity: 1; }
.nav-signin .icon { width: 16px; height: 16px; }

/* calculator: the instalment ring, one segment per monthly instalment */
.result-row { display: flex; align-items: center; gap: var(--s-200); }
.ring { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring path { fill: none; stroke: var(--green); stroke-width: 6; stroke-linecap: butt; opacity: 0; transform-origin: 32px 32px; transform: scale(0.86); transition: opacity 400ms var(--ease), transform var(--t-move) var(--ease); }
.ring path.on { opacity: 1; transform: none; }
.ring path:first-child { stroke: var(--green-light); }
.ring.is-blocked path { stroke: #C9CFCB; }
.ring span { position: relative; color: var(--green-ink); font-size: 16px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; } /* Title 3 values */
.ring.is-blocked span { color: var(--muted); }

/* how it works: a numbered rail that draws itself above the cards */
.steps-rail { display: none; }
@media (min-width: 900px) {
  .steps-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-300); position: relative; margin-top: var(--s-600); }
  .steps-rail::before, .steps-rail .fill { content: ""; position: absolute; inset-inline: var(--s-300) 0; top: 50%; height: 2px; border-radius: var(--r-full); }
  .steps-rail::before { background: var(--line); }
  .steps-rail .fill { background: var(--green); transform: scaleX(0); transform-origin: left center; transition: transform 1500ms var(--ease); }
  [dir="rtl"] .steps-rail .fill { transform-origin: right center; }
  .steps-rail.in .fill { transform: scaleX(1); }
  .steps-rail .node { position: relative; justify-self: start; margin-inline-start: var(--s-300); width: 40px; height: 40px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); color: var(--muted); transform: scale(0.8); transition: transform var(--t-move) var(--ease), background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease); }
  .steps-rail.in .node { transform: none; background: var(--ink); border-color: var(--ink); color: #fff; }
  .steps-rail.in .node:nth-of-type(2) { transition-delay: 550ms; }
  .steps-rail.in .node:nth-of-type(3) { transition-delay: 1100ms; }
  .steps-rail + .steps { margin-top: var(--s-300); }
  .steps-rail + .steps .step-no { display: none; }
  .steps-rail + .steps h3 { margin-top: 0; }
}

/* Murabaha flow: arrows between the four steps, in reading direction */
@media (min-width: 900px) {
  .flow li:not(:last-child)::after { content: ""; position: absolute; top: 50%; inset-inline-end: -13px; width: 10px; height: 10px; border-top: 2px solid var(--green); border-right: 2px solid var(--green); transform: translateY(-50%) rotate(45deg); z-index: 1; }
  [dir="rtl"] .flow li:not(:last-child)::after { border-right: 0; border-left: 2px solid var(--green); transform: translateY(-50%) rotate(-45deg); }
}

/* trust: who is responsible for each step */
.trust { margin-top: var(--s-600); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-300); list-style: none; padding: 0; }
@media (max-width: 1023px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .trust { grid-template-columns: 1fr; } }
.trust .card { display: grid; gap: var(--s-100); align-content: start; transition: transform var(--t-move) var(--ease), border-color var(--t-fade) var(--ease); }
.trust-icon { width: 48px; height: 48px; border-radius: var(--r-xl); background: var(--ink); color: #fff; display: grid; place-items: center; margin-bottom: var(--s-100); }
.trust .card p { color: var(--ink-2); }

/* FAQ answers slide open */
@keyframes answer { from { opacity: 0; transform: translateY(calc(var(--s-75) * -1)); } to { opacity: 1; transform: none; } }
.faq details[open] .answer { animation: answer var(--t-move) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .js .intro > *, .js .hero-visual, .js .hero-visual .orders li { animation: none; opacity: 1; }
  .js [data-reveal].in { transition-delay: 0ms; }
  .ring path { transition: opacity var(--t-fade) var(--ease); transform: none; }
  .steps-rail .fill, .steps-rail .node { transition: none; }
  .faq details[open] .answer { animation: none; }
  .benefits .card:hover .benefit-icon, .benefits .card.in:hover, .trust .card.in:hover { transform: none; }
}
.calc-head .chip, .payouts .chip { white-space: nowrap; }
