/* Landing page */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.site-nav { display: flex; gap: 24px; margin-inline-start: 16px; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-size: var(--step--1); }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

/* Hero */
.hero { padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.2vw, var(--step-5)); font-weight: 600; max-width: 18ch; }
[lang="ar"] .hero h1 { max-width: 20ch; font-weight: 600; }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 52ch; font-weight: 300; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero-note { font-size: var(--step--1); color: var(--ink-3); }

.ring { margin: 0; }
.ring svg { width: 100%; height: auto; overflow: visible; }
.ring figcaption { font-size: var(--step--1); color: var(--ink-3); max-width: 46ch; margin-inline: auto; text-align: center; }
.ring-centre-big { font: 600 26px var(--font); fill: var(--ink); }
.ring-centre-small { font: 400 14px var(--font); fill: var(--ink-3); }
.node-mono { font: 600 15px var(--font); fill: var(--ink); }
.node-label { font: 500 15px var(--font); fill: var(--ink-2); }
.token-text { font: 700 13px var(--font); fill: var(--d10k); }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--rule-soft); }
.section h2 { font-size: clamp(1.6rem, 3vw, var(--step-4)); max-width: 24ch; }
.section-lede { color: var(--ink-2); font-size: var(--step-1); font-weight: 300; max-width: 60ch; margin-bottom: 48px; }
.fine { font-size: var(--step--1); color: var(--ink-3); max-width: 70ch; }

/* Steps — a genuine sequence, so numbered */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.steps li { counter-increment: step; padding: 24px 24px 0 0; padding-inline: 0 28px; }
.steps li::before {
  content: counter(step);
  display: block; font-size: var(--step-3); font-weight: 300; color: var(--ink-3); margin-bottom: 12px;
}
.steps h3 { font-size: var(--step-1); }
.steps p { color: var(--ink-2); font-size: var(--step-0); }

/* Voucher specimens */
.specimens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.specimen {
  --c: var(--d10k); --tint: var(--d10k-tint);
  position: relative; overflow: hidden;
  border: 1.5px solid var(--c); border-radius: var(--r-lg);
  padding: 20px 22px 18px;
  background:
    repeating-linear-gradient(115deg, transparent 0 7px, color-mix(in srgb, var(--c) 9%, transparent) 7px 8px),
    var(--tint);
}
.specimen::after {
  content: ""; position: absolute; inset: 8px; border: 1px dashed color-mix(in srgb, var(--c) 35%, transparent); border-radius: 9px; pointer-events: none;
}
.s5k { --c: var(--d5k); --tint: var(--d5k-tint); }
.s1k { --c: var(--d1k); --tint: var(--d1k-tint); }
.specimen-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.8125rem; color: var(--c); }
.serial { direction: ltr; unicode-bidi: isolate; letter-spacing: 0.04em; }
.specimen-value { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 10px; color: var(--c); flex-wrap: wrap; }
.specimen-value .amount { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 700; line-height: 1; direction: ltr; unicode-bidi: isolate; }
.specimen-value .cur { font-weight: 500; }
.specimen-eg { margin: 0; color: var(--ink-2); font-size: var(--step--1); min-height: 3.2em; }
#vouchers .fine { margin-top: 24px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.pricing-grid > div > p { color: var(--ink-2); max-width: 48ch; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: start; vertical-align: top; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.price-table tr:first-child th, .price-table tr:first-child td { border-top: 2px solid var(--ink); }
.price-table th { font-weight: 500; width: 38%; padding-inline-end: 24px; color: var(--ink-2); }
.price-table td strong { display: block; font-size: var(--step-1); font-weight: 600; }
.price-table td span { color: var(--ink-3); font-size: var(--step--1); }

/* Controls */
.controls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 56px; margin-top: 40px; max-width: 980px; }
.controls h3 { font-size: var(--step-1); }
.controls p { color: var(--ink-2); margin: 0; }

/* Who trades with whom — a real 2x2: supplier rows x receiver columns */
.pairs-wrap { overflow-x: auto; max-width: 860px; }
.pairs { width: 100%; border-collapse: collapse; }
.pairs th, .pairs td { text-align: start; vertical-align: top; padding: 16px 18px; border: 1px solid var(--rule); }
.pairs thead th { background: var(--ink); color: #fff; font-weight: 500; font-size: var(--step--1); border-color: var(--ink); }
.pairs tbody th { background: var(--surface); font-weight: 600; width: 22%; }
.pairs td { background: var(--surface); color: var(--ink-2); }
.pairs td b { display: block; font-size: var(--step-1); color: var(--d10k); margin-bottom: 4px; direction: ltr; unicode-bidi: isolate; text-align: start; }
#who-h + .section-lede { margin-bottom: 28px; }
.pairs-wrap + .fine { margin-top: 14px; }
.cats-title { font-size: var(--step-1); margin-top: 40px; }
.cats-title + .cats { margin-top: 14px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 500; font-size: var(--step-1);
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--ink-3); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); margin: 0 0 18px; max-width: 64ch; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-2); }

/* Categories */
.cats { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cats li { border: 1px solid var(--rule); border-radius: 999px; padding: 8px 18px; background: var(--surface); }

/* Apply band */
.apply-band { background: var(--ink); color: #fff; padding: 64px 0; }
.apply-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.apply-band h2 { font-size: clamp(1.6rem, 3vw, var(--step-3)); }
.apply-band p { color: #c9d0dd; margin: 0; max-width: 56ch; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #e9ecf2; }

.site-footer { padding: 32px 0 48px; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: var(--step--1); color: var(--ink-3); }
.footer-row p { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .pricing-grid, .faq-grid { grid-template-columns: 1fr; }
  .faq-grid { gap: 12px; }
  .ring { max-width: 520px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .specimens { grid-template-columns: 1fr; max-width: 520px; }
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 36px; }
  .section { padding: 60px 0; }
  .steps { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .header-actions .btn-quiet { display: none; }
  .header-row { gap: 12px; }
  .wordmark span { font-size: 1rem; }
}
.steps.steps-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .steps.steps-5 { grid-template-columns: repeat(3, 1fr); row-gap: 28px; } }
@media (max-width: 760px) { .steps.steps-5 { grid-template-columns: 1fr; } }
.tax-example { margin-top: 40px; max-width: 760px; }
.tax-example h3 { font-size: var(--step-1); margin-bottom: 12px; }
@media (max-width: 420px) { .header-actions { gap: 6px; } .header-actions .btn-sm, .header-actions .lang-toggle { padding-inline: 10px; } }
#sharia .fine, #tax .fine { margin-top: 28px; }
.why-ic { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.why-math { margin-top: 36px; max-width: 860px; padding: 20px 24px; background: var(--surface, #fff); border: 1px solid var(--rule); border-inline-start: 4px solid #1d6b47; border-radius: 10px; }
.why-math h3 { margin: 0 0 8px; font-size: var(--step-1); }
.why-math p { margin: 0; color: var(--ink-2); line-height: 1.7; }
.pairs.compare td:last-child { font-weight: 600; color: var(--ink); }
.pairs.compare td { vertical-align: top; }
.site-nav a { white-space: nowrap; }
/* walkthrough */
.ex-parties { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 28px 0 8px; }
.ex-party { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px; flex: 1 1 260px; }
.ex-party b { display: block; }
.ex-party small { color: var(--ink-3); }
.ex-tag { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: #2a62a8; flex-shrink: 0; }
.ex-tag.b { background: #1d6b47; }
.ex-swap { font-size: 1.6rem; color: var(--ink-3); }
.timeline { list-style: none; margin: 28px 0 0; padding: 0; position: relative; max-width: 860px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 39px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.timeline li { display: flex; gap: 18px; align-items: flex-start; padding: 10px 0; position: relative; }
.tl-day { flex: 0 0 80px; text-align: center; font-size: .8125rem; font-weight: 700; background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 0; position: relative; z-index: 1; }
.timeline h3 { margin: 0 0 4px; font-size: var(--step-0); }
.timeline p { margin: 0; color: var(--ink-2); line-height: 1.65; }
/* demo form */
.demo-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.demo-points { padding-inline-start: 20px; color: var(--ink-2); line-height: 1.9; }
.demo-form, .demo-done { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 24px; display: grid; gap: 14px; }
.demo-form label { display: grid; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--ink); }
.demo-form input, .demo-form select, .demo-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; width: 100%; box-sizing: border-box; }
.demo-form input:focus, .demo-form select:focus, .demo-form textarea:focus { outline: 2px solid #2a62a8; outline-offset: 1px; }
.df-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.df-error { color: #a3322a; background: #fbe9e7; padding: 8px 12px; border-radius: 8px; margin: 0; }
.demo-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.demo-form .btn { justify-self: start; }
.demo-done h3 { margin: 0; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 560px) { .df-row { grid-template-columns: 1fr; } .tl-day { flex-basis: 64px; } .timeline::before { inset-inline-start: 31px; } }
.wa-float { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #fff; text-decoration: none; border-radius: 999px; padding: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.18); font-weight: 600; }
.wa-float:hover { background: #1ebe5b; }
.wa-float .wa-label { padding-inline-end: 6px; }
@media (max-width: 640px) { .wa-float .wa-label { display: none; } }
.wa-alt { margin: 0; font-size: .875rem; color: var(--ink-2); }
.wa-link { color: #128c4b; font-weight: 600; }
