/* ==========================================================================
   قاعدة متحركة للأجهزة — نخوة ستور
   Mobile-first, RTL. One accent colour, everything else is ink on light grey.
   ========================================================================== */

/* ── Fonts ──────────────────────────────────────────────────────────────
   Tajawal, self-hosted and split Arabic / Latin so a phone downloads only the
   range it is actually painting. Same six files the other storefronts use. */
@font-face {
  font-family: Tajawal; font-style: normal; font-weight: 400; font-display: swap;
  src: url(./assets/fonts/tajawal-400-ar.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: Tajawal; font-style: normal; font-weight: 400; font-display: swap;
  src: url(./assets/fonts/tajawal-400-lat.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB, U+2212;
}
@font-face {
  font-family: Tajawal; font-style: normal; font-weight: 700; font-display: swap;
  src: url(./assets/fonts/tajawal-700-ar.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: Tajawal; font-style: normal; font-weight: 700; font-display: swap;
  src: url(./assets/fonts/tajawal-700-lat.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB, U+2212;
}
@font-face {
  font-family: Tajawal; font-style: normal; font-weight: 800; font-display: swap;
  src: url(./assets/fonts/tajawal-800-ar.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: Tajawal; font-style: normal; font-weight: 800; font-display: swap;
  src: url(./assets/fonts/tajawal-800-lat.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB, U+2212;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --ink:        #14181f;
  --ink-2:      #5b6474;
  --ink-3:      #838d9c;
  --line:       #e4e7ec;
  --bg:         #f5f6f8;
  --card:       #ffffff;

  /* One accent. `--accent` is only ever a FILL behind white bold text (≥19px,
     so 3.5:1 clears AA for large text). `--accent-ink` is the darker sibling
     used whenever the orange has to be TEXT on light — it clears 4.5:1. */
  --accent:      #e85d04;
  --accent-dark: #c24e03;
  --accent-ink:  #a8420a;
  --accent-soft: #fff2e8;

  --wa:         #25d366;
  --wa-dark:    #1da851;
  --ok:         #0f7a3d;
  --bad:        #c0392b;

  --r:    14px;
  --r-lg: 20px;
  --shadow:    0 1px 2px rgba(20,24,31,.05), 0 8px 24px -12px rgba(20,24,31,.16);
  --shadow-lg: 0 2px 6px rgba(20,24,31,.06), 0 20px 46px -20px rgba(20,24,31,.26);

  /* Height of the fixed bottom bar, so page-end content can clear it. */
  --sticky-h: 0px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Tajawal, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  padding-bottom: var(--sticky-h);
}
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
svg { width: 100%; height: 100%; display: block; }

/* `hidden` has to win. The UA rule is `[hidden]{display:none}`, which any class
   that sets `display` outranks — `.btn` is one, so without this the WhatsApp
   rescue button would sit under the submit button before anything had failed. */
[hidden] { display: none !important; }

:where(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
.wrap-narrow { max-width: 620px; }

/* ── Section rhythm ─────────────────────────────────────────────────────── */
.sect { padding-block: 52px; }
.sect h2 { font-size: clamp(24px, 6.2vw, 34px); margin-bottom: 10px; }
.lede { color: var(--ink-2); font-size: 16px; margin-bottom: 26px; max-width: 46ch; }
.kicker {
  color: var(--accent-ink); font-weight: 800; font-size: 13px;
  letter-spacing: .08em; margin-bottom: 6px;
}

/* ── Top bar + header ───────────────────────────────────────────────────── */
.topbar {
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; font-size: 13.5px; font-weight: 700; text-align: center;
}
.topbar svg { width: 19px; height: 19px; flex: none; opacity: .9; }

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
}
.brand { font-size: 19px; font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.brand strong { font-weight: 800; color: var(--accent-ink); }
.head-cta {
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 14px; padding: 9px 18px; border-radius: 999px;
  white-space: nowrap;
}
.head-cta:hover { background: var(--accent-dark); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 800; font-size: 18px;
  text-decoration: none; text-align: center;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 16px 30px; min-height: 56px;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-main {
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(232,93,4,.65);
  width: 100%;
}
.btn-main:hover { background: var(--accent-dark); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(120% 90% at 85% 0%, #fff6ef 0%, rgba(255,246,239,0) 58%),
    #fff;
  border-bottom: 1px solid var(--line);
  padding-block: 26px 44px;
}
.hero-in { display: grid; gap: 26px; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(29px, 8.4vw, 46px); letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero .sub {
  color: var(--ink-2); font-size: 16.5px; margin-top: 14px; max-width: 44ch;
}

.hero-points { margin-top: 18px; display: grid; gap: 9px; }
.hero-points li {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15.5px;
}
.hero-points svg { width: 19px; height: 19px; flex: none; color: var(--ok); }

.price-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 22px;
}
.price-now { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.price-was { color: var(--ink-3); font-size: 17px; font-weight: 700; }
.price-tag {
  background: #e8f6ee; color: var(--ok); font-weight: 800; font-size: 13px;
  padding: 5px 12px; border-radius: 999px;
}
.hero .btn-main { margin-top: 20px; }
.micro { color: var(--ink-3); font-size: 13.5px; margin-top: 12px; text-align: center; }

.hero-media { margin: 0; }
.hero-media img {
  width: 100%; border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--shadow-lg);
}

/* ── Problem ────────────────────────────────────────────────────────────── */
.problem { background: var(--bg); }
.prob-grid { display: grid; gap: 14px; }
.prob {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px 18px;
}
.prob-ico {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: #fdecec; color: var(--bad);
  margin-bottom: 12px;
}
.prob-ico svg { width: 24px; height: 24px; }
.prob h3 { font-size: 17.5px; margin-bottom: 5px; }
.prob p { color: var(--ink-2); font-size: 15px; }

/* ── Solution ───────────────────────────────────────────────────────────── */
.solution { background: #fff; }
.solution-in { display: grid; gap: 22px; }
.video-card { margin: 0; }
.video-card video {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--r-lg); background: #eceef1;
  box-shadow: var(--shadow-lg);
}
.solution-copy { display: grid; gap: 14px; }
.solution-copy p { color: var(--ink-2); font-size: 16px; }

/* ── Features ───────────────────────────────────────────────────────────── */
.features { background: var(--bg); }
.feat-grid { display: grid; gap: 14px; }
.feat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 18px;
}
.feat-ico {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 13px; background: var(--accent-soft); color: var(--accent-ink);
  margin-bottom: 13px;
}
.feat-ico svg { width: 26px; height: 26px; }
.feat h3 { font-size: 17.5px; margin-bottom: 5px; }
.feat p { color: var(--ink-2); font-size: 15px; }

/* ── Steps ──────────────────────────────────────────────────────────────── */
.steps { background: #fff; }
.step-list { display: grid; gap: 18px; counter-reset: s; }
.step {
  position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
/* `contain`, not `cover`. Two of these three are supplier diagrams with text
   burned into them, and a cover-crop slices that text mid-sentence — which
   reads as a broken image rather than a diagram. Letterboxing on the page's
   own grey shows each one whole. */
.step img {
  width: 100%; aspect-ratio: 4 / 3;
  object-fit: contain; background: #f1f3f6;
}
.step > div { padding: 18px; }
.step h3 { font-size: 18.5px; margin-bottom: 5px; }
.step p { color: var(--ink-2); font-size: 15px; }
.step-n {
  position: absolute; inset-inline-start: 14px; top: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 12px rgba(20,24,31,.3);
}

/* ── Compatibility ──────────────────────────────────────────────────────── */
.compat { background: var(--bg); }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.chip-row li {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 17px; font-weight: 700; font-size: 14.5px;
}
.compat-shots { display: grid; gap: 14px; }
.compat-shots figure { margin: 0; }
.compat-shots img {
  width: 100%; border-radius: var(--r); background: #fff;
  border: 1px solid var(--line);
}

/* ── Gallery rail ───────────────────────────────────────────────────────── */
.gallery { background: #fff; padding-bottom: 40px; }
.rail {
  display: flex; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 16px 16px;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure {
  margin: 0; flex: 0 0 78%; max-width: 340px;
  scroll-snap-align: center;
}
.rail img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--r); background: #f0f2f5;
  border: 1px solid var(--line);
}
.dots { display: flex; justify-content: center; gap: 7px; }
.dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: #d3d8df; cursor: pointer; transition: all .2s ease;
}
.dots button[aria-current="true"] { background: var(--accent); width: 22px; border-radius: 999px; }

/* ── Reviews ────────────────────────────────────────────────────────────── */
.reviews { background: var(--bg); }
.review-grid { display: grid; gap: 14px; }
/* A card still carrying `is-empty` has no real review in it, so it is not
   rendered at all. script.js hides the whole section when every card is empty,
   which is why the section ships with `hidden` on it. */
.review.is-empty { display: none; }
.review {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px 18px;
}
.review .stars { color: #f5a623; font-size: 17px; letter-spacing: 2px; }
.review blockquote { margin: 8px 0 12px; font-size: 15.5px; color: var(--ink); }
.review figcaption { color: var(--ink-3); font-size: 13.5px; font-weight: 700; }

/* ── Order form ─────────────────────────────────────────────────────────── */
.order { background: #fff; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px 16px;
  box-shadow: var(--shadow);
}

.offers { border: 0; padding: 0; margin: 0 0 20px; }
.offers legend {
  padding: 0; margin-bottom: 11px; font-weight: 800; font-size: 15.5px;
}
.offer { display: block; cursor: pointer; margin-bottom: 10px; }
.offer input { position: absolute; opacity: 0; pointer-events: none; }
.offer-body {
  display: block; border: 2px solid var(--line); border-radius: var(--r);
  padding: 14px 15px; transition: border-color .15s ease, background-color .15s ease;
  position: relative;
}
.offer input:checked + .offer-body {
  border-color: var(--accent); background: var(--accent-soft);
}
.offer input:focus-visible + .offer-body {
  outline: 3px solid var(--accent-ink); outline-offset: 2px;
}
.offer-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.offer-head b { font-size: 16.5px; }
.offer-price { font-weight: 800; font-size: 18px; white-space: nowrap; }
.offer-note {
  display: block; color: var(--ink-2); font-size: 14px; margin-top: 3px;
}
.save {
  display: inline-block; font-style: normal; font-weight: 800; font-size: 12.5px;
  color: var(--ok); background: #e8f6ee; border-radius: 999px;
  padding: 2px 10px; margin-inline-start: 6px;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px: iOS zooms in under it */
  color: var(--ink); background: #fbfbfc;
  border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 13px 14px; min-height: 52px;
  transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #a9b2be; }
.field input:focus, .field textarea:focus {
  background: #fff; border-color: var(--accent); outline: 0;
}
.field input:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--accent-ink); outline-offset: 1px;
}
.hint { color: var(--ink-3); font-size: 13px; margin-top: 5px; }
.err { color: var(--bad); font-size: 13.5px; font-weight: 700; margin-top: 5px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--bad); background: #fffafa; }
.field.invalid .err { display: block; }
.field.invalid .hint { display: none; }

.total {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px dashed var(--line); margin-top: 20px; padding-top: 16px;
  font-size: 16px; font-weight: 700;
}
.total strong { font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.total-note { color: var(--ink-3); font-size: 13px; margin: 4px 0 16px; }

.btn-submit { position: relative; font-size: 17px; }
.btn-submit[disabled] { opacity: .75; cursor: not-allowed; }
.spinner {
  display: none; width: 19px; height: 19px; flex: none;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.is-sending .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-msg { margin-top: 12px; font-weight: 700; font-size: 14.5px; text-align: center; }
.form-msg.bad { color: var(--bad); }
.form-msg.ok  { color: var(--ok); }

.btn-wa-fallback {
  background: var(--wa); color: #fff; margin-top: 10px; width: 100%;
  font-size: 16px;
}
.btn-wa-fallback:hover { background: var(--wa-dark); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { background: var(--bg); }
.acc { display: grid; gap: 10px; }
.acc details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.acc summary {
  cursor: pointer; list-style: none;
  padding: 16px 18px; font-weight: 700; font-size: 15.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.acc summary::-webkit-details-marker { display: none; }
/* Physical borders on purpose. An accordion chevron points DOWN when closed and
   UP when open in every language — it is not a reading-direction arrow. With
   `border-inline-end` it flips to the left under `dir=rtl` and ends up pointing
   sideways. */
.acc summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 2.4px solid var(--ink-3); border-bottom: 2.4px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .2s ease; margin-top: -4px;
}
.acc details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.acc details[open] summary { color: var(--accent-ink); }
.acc-body { padding: 0 18px 16px; }
.acc-body p { color: var(--ink-2); font-size: 15px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot {
  background: var(--ink); color: #c9d0da;
  padding: 34px 0 30px; text-align: center;
}
.foot-brand { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.foot-brand strong { font-weight: 800; color: #ff9a4d; }
.foot-line { font-size: 14.5px; margin-bottom: 5px; }
.foot-line a { color: #fff; font-weight: 700; }
.foot-copy { font-size: 12.5px; color: #7f8998; margin-top: 16px; }

/* ── Floating WhatsApp ──────────────────────────────────────────────────── */
.wa-float {
  position: fixed; z-index: 45;
  inset-inline-end: 14px;
  bottom: calc(var(--sticky-h) + 14px + env(safe-area-inset-bottom, 0px));
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px -4px rgba(37,211,102,.6);
  transition: transform .15s ease, bottom .2s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* ── Sticky bottom CTA ──────────────────────────────────────────────────── */
.sticky-cta {
  position: fixed; z-index: 50; inset-inline: 0; bottom: 0;
  display: none; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px -14px rgba(20,24,31,.4);
  transform: translateY(110%);
  transition: transform .26s cubic-bezier(.22,1,.36,1);
}
.sticky-cta.on { transform: translateY(0); }
.sticky-price { flex: none; font-weight: 800; font-size: 19px; line-height: 1.25; }
.sticky-price s { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.sticky-cta .btn { flex: 1; min-height: 50px; padding: 12px 18px; font-size: 16.5px; }

/* The bar only exists on phones — on desktop the hero CTA never leaves reach. */
@media (max-width: 860px) {
  .sticky-cta { display: flex; }
  body { --sticky-h: 76px; }
}

/* ── Scroll reveal ──────────────────────────────────────────────────────── */
/* Gated on `.js`, which a one-line inline script in <head> adds before first
   paint. Without JS the observer never runs, so the elements must never have
   been hidden in the first place — otherwise the page ships blank. */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
  .sticky-cta { transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; }
}

/* ── Wider screens ──────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .sect { padding-block: 64px; }
  .prob-grid, .feat-grid, .compat-shots, .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rail figure { flex-basis: 46%; }
  .card { padding: 26px 24px; }
  .hero .btn-main, .solution-copy .btn-main { width: auto; min-width: 280px; }
  .micro { text-align: start; }
  /* `min-height` + a stretched image gives the three cards one height, so the
     row reads as three steps rather than three differently-sized boxes. The
     copy is short, so it is centred against the image instead of clinging to
     the top of a tall card. */
  .step { display: grid; grid-template-columns: 240px 1fr; align-items: stretch; min-height: 208px; }
  .step img { height: 100%; aspect-ratio: auto; }
  .step > div { padding: 22px 26px; align-self: center; }
}

@media (min-width: 900px) {
  .sect { padding-block: 84px; }
  .hero { padding-block: 48px 72px; }
  .hero-in { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 44px; }
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .review-grid { grid-template-columns: repeat(3, 1fr); }

  /* Three steps, three columns. The side-by-side row from the 640px breakpoint
     leaves most of a 1280px card empty once the copy is this short. */
  .step-list { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .step { display: block; min-height: 0; }
  .step img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .step > div { padding: 20px 22px; align-self: auto; }
  .solution-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
  .rail { padding-inline: max(16px, calc((100vw - 1080px) / 2)); }
  .rail figure { flex-basis: 30%; }
  .sect h2 { font-size: 36px; }
}
