/* MX landing — a view-only showcase. Monochrome: a black MX card in payment-card
   proportions, white product cards, black actions. Icons over words. */

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-arabic-600.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-arabic-700.ttf') format('truetype');
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f1f3;
  --line: #ebebee;
  --line-2: #dfdfe4;
  --text: #111113;
  --muted: #6b6b73;
  --dim: #9c9ca4;
  --black: #0d0d0f;
  --black-2: #1d1d21;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -14px rgba(0, 0, 0, 0.14);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.05), 0 30px 60px -24px rgba(0, 0, 0, 0.28);
  --radius: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 76px;
  --block-gap: clamp(28px, 4vw, 48px);
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(0, 0, 0, 0.14); }
:focus-visible { outline: 2px solid rgba(17, 17, 19, 0.45); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
html { -webkit-tap-highlight-color: transparent; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: #fff; color: var(--black); padding: 8px 14px; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 12px; }
bdi { white-space: nowrap; }
.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: 24px; }
.ico { width: 20px; height: 20px; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding-inline: 30px; border-radius: 999px;
  font-weight: 800; font-size: 1.02rem; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-light { background: #fff; color: var(--black); box-shadow: 0 14px 34px -14px rgba(255, 255, 255, 0.55); }
.btn-round { width: 56px; padding: 0; }
.btn-round .ico { width: 24px; height: 24px; }
.btn-lg { height: 60px; padding-inline: 34px; font-size: 1.08rem; }


/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: #ffffff;
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow 0.35s var(--ease);
}
.site-header.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -22px rgba(0, 0, 0, 0.35); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5); }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; direction: ltr; text-align: start; }
.brand-word strong { font-size: 0.98rem; letter-spacing: 0.14em; font-weight: 800; white-space: nowrap; }
.brand-word small { font-size: 0.6rem; letter-spacing: 0.3em; font-weight: 700; margin-top: 3px; opacity: 0.55; }
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a { padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; opacity: 0.72; transition: opacity 0.2s, background-color 0.2s; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang {
  display: inline-flex; align-items: center; gap: 7px; height: 44px; padding-inline: 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 800; font-size: 0.88rem;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.lang .ico { width: 17px; height: 17px; }



/* ---------- Hero: the MX card ----------
   Payment-card proportions (85.6 × 54 mm ≈ 1.586 : 1) at every size. Inside,
   MX sits at the centre with the tools fanned out on both sides; everything is
   sized in container units so the card scales as one piece. */
.hero { position: relative; isolation: isolate; padding: calc(var(--header-h) + var(--block-gap)) 0 0; overflow-x: clip; }
.hero-inner { display: flex; justify-content: center; }
/* The card is sized by the screen's height as well as its width, so on short desktop
   screens it never fills the first view: header + gap + card + gap leaves ~150px of products. */
.card-wrap {
  --fit: calc((100vh - var(--header-h) - 2 * var(--block-gap) - 150px) * 1.586);
  --fit: calc((100svh - var(--header-h) - 2 * var(--block-gap) - 150px) * 1.586);
  width: clamp(300px, var(--fit), 640px); max-width: 100%;
  container-type: inline-size; perspective: 1400px;
}
.mx-card {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%;
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 85.6 / 53.98;
  display: flex; flex-direction: column; align-items: stretch; justify-content: space-between;
  padding: 5.6cqw 6.2cqw;
  border-radius: 4.6cqw;
  color: #fff;
  background:
    radial-gradient(60% 55% at 50% 40%, rgba(255, 255, 255, 0.09) 0%, transparent 70%),
    linear-gradient(135deg, #1e1e23 0%, #0b0b0d 45%, #141418 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10) inset,
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 50px 90px -40px rgba(0, 0, 0, 0.55),
    0 24px 40px -24px rgba(0, 0, 0, 0.45);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--ease);
}
.mx-card.tilting { transition: transform 0.12s linear; }
.card-pattern {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}
.card-glare {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at var(--gx) var(--gy), rgba(255, 255, 255, 0.12), transparent 60%);
}

/* Top line: name and offer badge */
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; }
.card-word { font-size: clamp(9px, 2.3cqw, 16px); font-weight: 700; letter-spacing: 0.3em; direction: ltr; color: rgba(255, 255, 255, 0.85); }
.offer-badge {
  display: inline-flex; align-items: center; height: clamp(22px, 5.2cqw, 36px); padding-inline: clamp(9px, 2.6cqw, 18px); border-radius: 999px;
  background: #ffffff; color: var(--black); font-size: clamp(10.5px, 2.2cqw, 15px); font-weight: 800; white-space: nowrap;
}

/* The three tools in the offer, joined with plus signs */
.offer-apps { position: relative; display: flex; align-items: center; justify-content: center; gap: 3cqw; }
.offer-apps .floor { position: absolute; left: 14%; right: 14%; bottom: -3.6cqw; height: 7cqw; background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.16), transparent 70%); filter: blur(0.8cqw); pointer-events: none; }
.tile {
  position: relative; flex: none; overflow: hidden;
  width: 15.5cqw; aspect-ratio: 1; border-radius: 24%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2.4cqw 4cqw -2cqw rgba(0, 0, 0, 0.95);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.plus { flex: none; width: 4.2cqw; height: 4.2cqw; color: rgba(255, 255, 255, 0.55); stroke-width: 2.2; }

/* Bottom line: price and order button */
.offer-price { display: flex; align-items: baseline; gap: 1.2cqw; margin: 0; white-space: nowrap; }
.offer-price b { font-size: 7.6cqw; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.offer-price .cur { font-size: clamp(11px, 2.8cqw, 20px); font-weight: 800; }
.offer-price .per { font-size: clamp(11px, 2.6cqw, 18px); font-weight: 700; color: rgba(255, 255, 255, 0.7); }
.offer-cta {
  display: inline-flex; align-items: center; gap: 1.6cqw; flex: none;
  height: clamp(34px, 8cqw, 56px); padding-inline: clamp(14px, 3.6cqw, 28px); border-radius: 999px;
  background: #ffffff; color: var(--black); font-weight: 800; font-size: clamp(12.5px, 2.4cqw, 17px); white-space: nowrap;
  box-shadow: 0 1.6cqw 3.2cqw -1.6cqw rgba(255, 255, 255, 0.45);
  transition: transform 0.25s var(--ease);
}
.offer-cta .ico { width: clamp(15px, 2.6cqw, 20px); height: clamp(15px, 2.6cqw, 20px); }
.offer-cta:active { transform: scale(0.96); }
@media (hover: hover) { .offer-cta:hover { transform: translateY(-2px); } }



/* ---------- Sections ---------- */
.section { padding: 88px 0; position: relative; }
.section-alt { background: var(--surface); }
/* Equal spacing between the main blocks (IDs so the phone rules below can't override them). */
#products, #services { padding: var(--block-gap) 0 0; }
#contact { padding: var(--block-gap) 0; }
.section-head { display: flex; flex-direction: column; align-items: center; margin-bottom: 36px; text-align: center; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
[lang="en"] h2 { letter-spacing: -0.03em; }

/* ---------- Product cards (matched to the owner's reference) ---------- */
.products { --cols: 4; --gap: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.products > .product { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
.product {
  display: flex; flex-direction: column; overflow: hidden;
  background: #ffffff; border: 1px solid #efeff2; border-radius: 26px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 28px -14px rgba(0, 0, 0, 0.12);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
@media (hover: hover) {
  .product:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 22px 44px -20px rgba(0, 0, 0, 0.2); }
  .product:hover .product-media img { transform: translateY(-3px) scale(1.04); }
}
.product-media { aspect-ratio: 1 / 0.8; display: grid; place-items: center; background: #ffffff; }
.product-media img {
  width: 56%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 23%; margin-top: 6%;
  box-shadow: 0 18px 30px -14px rgba(0, 0, 0, 0.38), 0 4px 10px -4px rgba(0, 0, 0, 0.12);
  transition: transform 0.6s var(--ease);
}
.product-body { display: flex; flex-direction: column; flex: 1; padding: 6px 20px 20px; }
.product h3 {
  font-size: 1.2rem; font-weight: 800; line-height: 1.35; color: #111113; direction: ltr; text-align: start;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
[dir="rtl"] .product h3 { text-align: right; }
.product-type { margin-top: 4px; color: #3d3d44; font-size: 0.95rem; font-weight: 700; }
.product-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.product-price { display: flex; align-items: baseline; flex-wrap: nowrap; gap: 0 6px; margin: 0; white-space: nowrap; }
.product-price b { font-size: 1.6rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: #111113; }
.product-price .cur { font-size: 0.9rem; font-weight: 800; color: #111113; }
.product-price .per { font-size: 1rem; font-weight: 700; color: #3d3d44; }
.product-wa {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 52px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; white-space: nowrap;
  background: var(--black); color: #fff; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.product-wa .ico { width: 22px; height: 22px; }
.product-wa:active { transform: scale(0.97); }

/* ---------- Services: a tidy list in one panel ---------- */
.svc-panel {
  padding: 30px 32px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow-card);
}
.svc-panel h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin-bottom: 10px; }
.services { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.svc {
  display: flex; align-items: center; gap: 14px; padding: 15px 10px; margin-inline: -10px;
  border-top: 1px solid var(--line); border-radius: 0;
  transition: background-color 0.25s var(--ease);
}
.svc-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--black); color: #fff; box-shadow: 0 10px 18px -12px rgba(0, 0, 0, 0.8); }
.svc-ico svg { width: 22px; height: 22px; }
.svc-name { flex: 1; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.svc-go { flex: none; width: 18px; height: 18px; color: var(--dim); transition: transform 0.25s var(--ease), color 0.25s var(--ease); }
@media (hover: hover) {
  .svc:hover { background: var(--surface-2); border-radius: 16px; }
  .svc:hover .svc-go { color: var(--text); transform: translateX(3px); }
  [dir="rtl"] .svc:hover .svc-go { transform: scaleX(-1) translateX(3px); }
}

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: 72px 28px; border-radius: 36px; background: var(--black); color: #fff;
  display: flex; flex-direction: column; align-items: center;
}
.contact-glow { position: absolute; inset: -50% -10% auto; height: 130%; z-index: -1; background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 42%, transparent 66%); }
.contact::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 55% 70% at 50% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 50% 0%, #000, transparent 75%);
}
.contact-logo { width: 72px; height: 72px; border-radius: 22px; margin-bottom: 24px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 60px -10px rgba(255, 255, 255, 0.3); }
.contact .btn { margin-top: 28px; letter-spacing: 0.03em; }
.contact-legal { margin-top: 26px; color: rgba(255, 255, 255, 0.42); font-size: 0.8rem; font-weight: 600; }


/* Floating WhatsApp */
.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--black); color: #fff; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.wa-float svg { width: 27px; height: 27px; }
@media (hover: hover) {
  .btn-light:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(255, 255, 255, 0.6); }
  .nav a:hover { opacity: 1; background: rgba(127, 127, 127, 0.12); }
  .product-wa:hover { background: #2a2a30; transform: translateY(-1px); }
  .wa-float:hover { transform: scale(1.07); }
}
.wa-float:active { transform: scale(0.94); }
.wa-float.hide { opacity: 0; pointer-events: none; transform: scale(0.8); }

/* Saved-English visitors: hold the first paint until the copy is swapped. */
.lang-pending body { visibility: hidden; }

/* ---------- Reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.js .reveal[data-d="1"] { transition-delay: 0.05s; }
.js .reveal[data-d="2"] { transition-delay: 0.1s; }
.js .reveal[data-d="3"] { transition-delay: 0.15s; }
.js .reveal[data-d="4"] { transition-delay: 0.2s; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .products { --cols: 3; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 820px) {
  .products { --cols: 2; --gap: 14px; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; --radius: 22px; }
  .wrap { padding-inline: 16px; }
  .brand img { width: 36px; height: 36px; border-radius: 11px; }
  .brand-word small { display: none; }
  .lang { height: 40px; padding-inline: 12px; }
  .card-wrap { width: min(92%, max(280px, var(--fit))); }
  .offer-price b { font-size: 8cqw; }
  .btn { height: 52px; padding-inline: 24px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 24px; }
  .products { --gap: 12px; }
  .product { border-radius: 20px; }
  .product-media img { width: 60%; }
  .product-body { padding: 2px 11px 12px; }
  .product h3 { font-size: 1.04rem; }
  .product-type { font-size: 0.86rem; }
  .product-foot { padding-top: 10px; gap: 14px; }
  .product-price { gap: 0 4px; }
  .product-price b { font-size: 1.18rem; }
  .product-price .cur { font-size: 0.76rem; }
  .product-price .per { font-size: 0.84rem; }
  .product-wa { height: 42px; font-size: 0.9rem; gap: 7px; box-shadow: 0 8px 16px -7px rgba(0, 0, 0, 0.45); }
  .product-wa .ico { width: 18px; height: 18px; }
  .svc-panel { padding: 22px 18px 6px; border-radius: 26px; }
  .svc-panel h2 { margin-bottom: 6px; }
  .services { grid-template-columns: 1fr; }
  .svc { padding: 13px 8px; margin-inline: -8px; gap: 12px; }
  .svc-ico { width: 42px; height: 42px; border-radius: 13px; }
  .svc-ico svg { width: 20px; height: 20px; }
  .svc-name { font-size: 0.95rem; }
  .contact { padding: 56px 20px; border-radius: 28px; }
  .contact .btn { width: 100%; }
  .wa-float { width: 52px; height: 52px; bottom: 16px; inset-inline-end: 16px; }
}

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