/* =========================================================
   Dimension — landing page
   Tokens
   ========================================================= */
:root {
  --red: #e5383b;
  --crimson: #a11d33;
  --maroon: #38040e;
  --paper: #ffffff;
  --surface: #f3f1f1;
  --ink: #141114;
  --ink-2: #5f585a;
  --rule: #e6e1e1;
  --on-dark: #fbeef0;
  --on-dark-2: #d9b5bb;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: var(--font);
  --wide: 125%;

  --gutter: clamp(20px, 5vw, 80px);
  --max: 1440px;
  --nav-h: 76px;

  --ease-out: cubic-bezier(.2, .7, .1, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-stretch: var(--wide); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
h2 { font-size: clamp(2.2rem, 5vw, 4.4rem); }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); line-height: 1.15; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px;
}
.skip:focus { top: 16px; }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; border-radius: 8px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color .25s var(--ease-soft), transform .25s var(--ease-soft), color .25s;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--crimson); }
.btn-dark { background: var(--maroon); color: #fff; }
.btn-dark:hover { background: #4e0a18; }
.btn-lg { height: 58px; padding: 0 30px; font-size: 16px; }

.link-plain {
  font-weight: 500; text-decoration: underline; text-underline-offset: 6px;
  text-decoration-thickness: 1px; text-decoration-color: var(--rule);
  transition: text-decoration-color .25s, color .25s;
}
.link-plain:hover { color: var(--red); text-decoration-color: var(--red); }

/* Section heads */
.section-head {
  width: min(var(--max), 100%); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end;
}
.section-head h2 { grid-column: 1 / span 7; }
.section-head p { grid-column: 9 / span 4; color: var(--ink-2); max-width: 34ch; font-size: 17px; }
.section-head-light h2 { color: var(--on-dark); }
.section-head-light p { color: var(--on-dark-2); }

/* =========================================================
   Logo mark (inline SVG)
   ========================================================= */
.mark { width: 100%; height: auto; color: var(--red); overflow: visible; }
.mark .ln { fill: currentColor; }
.wordmark { height: 18px; width: auto; color: var(--ink); }
.wordmark-ar { height: 27px; }
html[lang="ar"] .wordmark-en, html[lang="en"] .wordmark-ar { display: none; }
html[lang="ar"] .lockup-en, html[lang="en"] .lockup-ar { display: none; }

/* =========================================================
   Nav
   ========================================================= */
.js body.is-intro .nav { opacity: 0; }
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; transition: opacity .6s var(--ease-soft);
  height: var(--nav-h);
}
/* the bar's background lives on a layer that only fades, so scrolling never repaints the nav */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: #fff; box-shadow: 0 1px 0 var(--rule);
  opacity: 0; will-change: opacity; transition: opacity .4s var(--ease-soft);
}
.nav.is-scrolled::before { opacity: .96; }
.nav.is-dark { color: #fff; }
.nav.is-dark::before { background: var(--maroon); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.nav.is-dark .wordmark { color: #fff; }
.nav.is-dark .nav-toggle span { background: #fff; }
.nav.is-dark .brand-mark .mark { color: #fff; }
.nav-inner {
  width: min(var(--max), 100%); margin: 0 auto; height: 100%;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 40px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; margin-inline-end: auto; }
.brand-mark {
  display: block; width: 38px; aspect-ratio: 504.55 / 451.91;
  opacity: 0; transition: opacity .2s;
}
.brand-mark.is-visible { opacity: 1; }
.brand-mark .ln { opacity: 1; transform: none; animation: none; }
.brand-mark .ln path { stroke: currentColor; stroke-width: 7; stroke-linejoin: round; }
.nav-links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease-out), top .3s var(--ease-out);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px var(--gutter) 24px; background: var(--paper); border-bottom: 1px solid var(--rule);
}
.mobile-menu a { padding: 14px 0; font-size: 18px; font-weight: 500; border-bottom: 1px solid var(--rule); }
.mobile-menu .btn { margin-top: 16px; border-bottom: 0; font-size: 15px; }
.nav.is-open .mobile-menu { display: flex; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: var(--nav-h);
}
.hero-inner {
  position: relative; z-index: 1;
  flex: 1;
  width: min(var(--max), 100%); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center;
}
.hero-copy { grid-column: 1 / span 7; padding: 48px 0; }
.hero-title {
  font-size: clamp(2.9rem, 7.2vw, 7.4rem);
  line-height: .96;
  margin-bottom: 32px;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-title .line > span { display: inline-block; }
.js .hero-title .line > span { transform: translateY(112%); }
.js .hero.is-in .hero-title .line > span { animation: rise 1.1s var(--ease-out) forwards; }
.hero-title .line:nth-child(1) > span { animation-delay: .15s; }
.hero-title .line:nth-child(2) > span { animation-delay: .27s; }
.hero-sub { max-width: 52ch; font-size: clamp(1.05rem, 1.3vw, 1.25rem); color: var(--ink-2); }
.js .hero-sub { opacity: 0; }
.js .hero.is-in .hero-sub { animation: fade-up .9s var(--ease-out) .55s forwards; }
.hero-actions { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; margin-top: 40px; }
.js .hero-actions { opacity: 0; }
.js .hero.is-in .hero-actions { animation: fade-up .9s var(--ease-out) .7s forwards; }
.hero-mark-slot { grid-column: 8 / span 5; aspect-ratio: 504.55 / 451.91; }
.hero-foot {
  position: relative; z-index: 1;
  width: min(var(--max), 100%); margin: 0 auto; padding: 0 var(--gutter) 28px;
  display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2);
}
.js .hero-foot { opacity: 0; }
.js .hero.is-in .hero-foot { animation: fade-up .9s var(--ease-out) 1.1s forwards; }

/* Flying mark: starts in the hero, shrinks into the nav as the page scrolls */
.flying-mark {
  position: fixed; left: 0; top: 0; z-index: 61;
  width: 400px; transform-origin: 0 0;
  pointer-events: none; opacity: 0;
  will-change: transform; backface-visibility: hidden;
}
.flying-mark.is-ready { opacity: 1; }
.flying-mark.is-docked { visibility: hidden; }
.flying-mark .ln {
  opacity: 0;
  transform-box: fill-box; transform-origin: 50% 100%;
  transform: translateY(8%) scaleY(.72);
  animation: line-in 1s var(--ease-out) forwards;
  animation-delay: calc(.2s + var(--i) * 16ms);
}
.flying-mark { position: fixed; }
.flying-mark .mark-thick { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.flying-mark .mark-thick .ln { opacity: 1; transform: none; animation: none; }
.flying-mark .mark-thick path { stroke: currentColor; stroke-width: 7; stroke-linejoin: round; }

@keyframes line-in {
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}
@keyframes rise {
  to { transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Ticker
   ========================================================= */
.ticker {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  height: 60px; display: flex; align-items: center; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; align-items: center; gap: 36px; width: max-content; padding-left: 36px;
  animation: ticker 48s linear infinite;
  font-size: 15px; font-weight: 500; letter-spacing: .01em; color: var(--ink-2);
}
.ticker-track span { white-space: nowrap; }
.ticker-track i {
  display: block; width: 24px; height: 22px; flex: none;
  background: url("../assets/logo/mark-small.svg") center / contain no-repeat;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* =========================================================
   What we build
   ========================================================= */
.build { padding: clamp(80px, 10vw, 140px) 0; }
.build-grid {
  width: min(var(--max), 100%); margin: 56px auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start;
}
.services { grid-column: 1 / span 6; border-top: 1px solid var(--rule); }
.service { border-bottom: 1px solid var(--rule); position: relative; }
.service::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--ease-out);
}
.service.is-active::before { transform: scaleX(1); }
.service-btn {
  display: block; width: 100%; text-align: start; padding: 26px 0;
}
.service-plus { display: none; }
.service-title {
  display: block; font-stretch: var(--wide); font-weight: 700; letter-spacing: -0.015em;
  font-size: clamp(1.35rem, 2vw, 1.9rem); line-height: 1.1;
  transition: color .3s, transform .4s var(--ease-out);
}
.service:hover .service-title, .service.is-active .service-title { color: var(--red); }
.service-desc {
  display: grid; grid-template-rows: 0fr; color: var(--ink-2); max-width: 46ch; opacity: 0;
  transition: grid-template-rows .85s var(--ease-out), opacity .7s .1s, padding-top .85s var(--ease-out);
}
.service-desc > span { display: block; min-height: 0; overflow: hidden; }
.service.is-active .service-desc { grid-template-rows: 1fr; opacity: 1; padding-top: 12px; }
.service-mock-mobile { display: none; }

.preview { grid-column: 7 / span 6; position: sticky; top: calc(var(--nav-h) + 24px); }
.preview-stage {
  position: relative; aspect-ratio: 4 / 3; background: var(--surface); border-radius: 18px;
  padding: clamp(18px, 3vw, 44px); overflow: hidden;
}
.preview-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 100%, rgba(229, 56, 59, .10), transparent 60%);
}
.preview-stage .mock {
  position: absolute; inset: clamp(18px, 3vw, 44px);
  opacity: 0; transform: translateY(18px) scale(.985);
  transition: opacity .7s var(--ease-soft), transform .9s var(--ease-out);
}
.preview-stage .mock.is-active { opacity: 1; transform: none; }

/* Shared app window chrome (service previews + demo screens) */
.mock, .screen {
  background: #fff; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; font-size: 13px; color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(56, 4, 14, .35);
}
.mock-bar, .screen-bar {
  flex: none; height: 42px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--rule); font-size: 12px; font-weight: 500; color: var(--ink-2);
}
.mock-url { color: var(--ink); }
.mock-dim { color: #9a9294; font-weight: 400; }
.mock-body, .screen-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }

/* Landing mock */
.mock-landing .mock-body { gap: 0; position: relative; }
.ml-nav { display: flex; gap: 10px; align-items: center; margin-bottom: 8%; }
.ml-nav b { width: 16px; height: 14px; background: url("../assets/logo/mark-small.svg") center / contain no-repeat; }
.ml-nav i { width: 28px; height: 5px; border-radius: 3px; background: var(--rule); }
.ml-nav i:first-of-type { margin-inline-start: auto; }
.ml-hero { width: 55%; }
.ml-h1 { height: 14px; width: 100%; border-radius: 4px; background: var(--ink); margin-bottom: 8px; }
.ml-h1.short { width: 72%; margin-bottom: 16px; }
.ml-p { height: 6px; width: 90%; border-radius: 3px; background: var(--rule); margin-bottom: 6px; }
.ml-p.short { width: 60%; margin-bottom: 18px; }
.ml-btn { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; padding: 7px 12px; border-radius: 5px; }
.ml-art { position: absolute; inset-inline-end: 8%; bottom: 10%; width: 32%; }

/* Store mock */
.ms-cart { color: var(--ink); } .ms-cart b { display: inline-block; background: var(--red); color: #fff; border-radius: 10px; padding: 0 6px; margin-inline-start: 4px; font-size: 10px; }
.mock-store .mock-body { overflow: hidden; }
.ms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex: 1; min-height: 0; overflow: hidden; align-content: start; }
.ms-item span { display: block; height: 6px; width: 70%; background: var(--rule); border-radius: 3px; margin: 6px 0 4px; }
.ms-item em { font-style: normal; font-size: 11px; font-weight: 600; }
.ms-img { aspect-ratio: 5 / 4; border-radius: 6px; background: var(--surface); }
.ms-img.a { background: linear-gradient(135deg, #f7d4d5, #e5383b); }
.ms-img.b { background: linear-gradient(135deg, #ece9e9, #c9c2c3); }
.ms-img.c { background: linear-gradient(135deg, #38040e, #a11d33); }
.ms-img.d { background: linear-gradient(135deg, #f3f1f1, #e9c0c3); }
.ms-img.e { background: linear-gradient(135deg, #a11d33, #38040e); }
.ms-img.f { background: linear-gradient(135deg, #ddd7d8, #f3f1f1); }
.ms-checkout { margin-top: auto; display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--rule); }
.ms-checkout b { margin-inline-start: auto; background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 5px; font-size: 11px; }

/* POS mock + demo POS */
.mp-lines, .ds-lines { display: flex; flex-direction: column; }
.mp-line, .ds-line { display: grid; grid-template-columns: 1fr 32px 70px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--rule); }
.mp-line em, .ds-line em { font-style: normal; color: var(--ink-2); text-align: center; }
.mp-line b, .ds-line b { text-align: end; font-weight: 600; }
.mp-total, .ds-total { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.mp-total b, .ds-total b { font-stretch: var(--wide); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.mp-pay { display: flex; gap: 8px; }
.mp-pay span { flex: 1; text-align: center; padding: 9px 0; border-radius: 6px; background: var(--surface); font-weight: 600; font-size: 12px; }
.mp-pay span.on { background: var(--red); color: #fff; }

/* Inventory mock + demo inventory */
.mi-row, .di-row { display: grid; grid-template-columns: 1fr 90px 36px auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.mi-row i, .di-row i { height: 6px; border-radius: 3px; background: var(--surface); position: relative; overflow: hidden; }
.mi-row i::after, .di-row i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--ink); border-radius: 3px; transition: width .8s var(--ease-out); }
.mi-row.low i::after, .di-row.is-low i::after { background: var(--red); }
.mi-row b, .di-row b { text-align: end; font-weight: 600; }
.mi-row u, .di-row u {
  text-decoration: none; font-size: 10px; font-weight: 600; color: var(--red);
  border: 1px solid currentColor; border-radius: 4px; padding: 2px 6px;
}
.di-row u { opacity: 0; transform: translateX(6px); transition: opacity .4s, transform .4s var(--ease-out); }
.di-row u.on { opacity: 1; transform: none; }

/* ERP mock + demo dashboard */
.me-kpis, .de-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.de-kpis { grid-template-columns: 1fr 1fr; }
.me-kpis div, .de-kpis div { background: var(--surface); border-radius: 8px; padding: 10px 12px; }
.me-kpis small, .de-kpis small { display: block; font-size: 10px; color: var(--ink-2); margin-bottom: 4px; }
.me-kpis b, .de-kpis b { font-stretch: var(--wide); font-weight: 800; font-size: 15px; letter-spacing: -0.02em; white-space: nowrap; }
.me-chart, .de-chart { flex: 1; display: flex; align-items: flex-end; gap: 6px; min-height: 60px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.me-chart i, .de-chart i { flex: 1; height: var(--h); background: var(--rule); border-radius: 3px 3px 0 0; transition: height .9s var(--ease-out); }
.me-chart i.now, .de-chart i.now { background: var(--red); }
.me-list div { display: flex; justify-content: space-between; font-size: 11px; padding: 6px 0; color: var(--ink-2); }
.me-list b { color: var(--ink); }

/* =========================================================
   Work
   ========================================================= */
.work { padding: 0 0 clamp(80px, 10vw, 140px); }
.work-grid {
  width: min(var(--max), 100%); margin: 56px auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px 24px;
}
.work-item { grid-column: span 2; display: flex; flex-direction: column; gap: 16px; color: inherit; }
.work-item-wide { grid-column: span 3; }
.work-shot {
  display: block; position: relative; aspect-ratio: 16 / 11; overflow: hidden; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule);
  container-type: size;
  transition: border-color .3s, box-shadow .4s var(--ease-soft), transform .4s var(--ease-out);
}
.work-bar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 1; height: 30px; padding: 0 12px;
  display: flex; align-items: center; font-size: 11px; font-weight: 500; color: var(--ink-2);
  background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--rule);
}
.work-shot img {
  position: absolute; left: 0; top: 30px; width: 100%; height: auto;
  transition: transform 4.5s cubic-bezier(.4, 0, .3, 1);
}
.work-item:hover .work-shot { border-color: #d6cfcf; box-shadow: 0 30px 60px -36px rgba(56, 4, 14, .35); transform: translateY(-3px); }
.work-item:hover .work-shot img { transform: translateY(calc(-100% + 100cqh - 30px)); }
.work-item:focus-visible { outline: none; }
.work-item:focus-visible .work-shot { outline: 2px solid var(--red); outline-offset: 4px; }
.work-meta { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: baseline; }
.work-meta strong { font-stretch: var(--wide); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.work-meta span { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.work-meta em {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 14px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--rule); transition: color .25s, text-decoration-color .25s;
}
.work-item:hover .work-meta em { color: var(--red); text-decoration-color: var(--red); }

/* =========================================================
   Connected demo (dark)
   ========================================================= */
.demo { background: var(--maroon); color: var(--on-dark); padding: clamp(80px, 10vw, 140px) 0 0; }
.demo-body {
  width: min(var(--max), 100%); margin: 56px auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
}
.demo-screens {
  grid-column: 1 / span 6; position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h));
  display: flex; align-items: center;
}
.demo-screens > .screen {
  position: absolute; left: 0; right: 0; margin: auto; width: min(100%, 560px); aspect-ratio: 4 / 3;
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .6);
  transition: transform .8s var(--ease-out), opacity .6s var(--ease-soft);
  opacity: .35;
}
.demo-screens > .screen[data-k="1"] { z-index: 3; }
.demo-screens > .screen[data-k="2"] { z-index: 2; transform: translate(6%, -6%) scale(.94); }
.demo-screens > .screen[data-k="3"] { z-index: 1; transform: translate(12%, -12%) scale(.88); }
/* step 2 active */
.demo-screens[data-active="2"] > .screen[data-k="1"] { transform: translate(-6%, 6%) scale(.94); z-index: 1; }
.demo-screens[data-active="2"] > .screen[data-k="2"] { transform: none; z-index: 3; }
.demo-screens[data-active="2"] > .screen[data-k="3"] { transform: translate(6%, -6%) scale(.94); z-index: 2; }
/* step 3 active */
.demo-screens[data-active="3"] > .screen[data-k="1"] { transform: translate(-12%, 12%) scale(.88); z-index: 1; }
.demo-screens[data-active="3"] > .screen[data-k="2"] { transform: translate(-6%, 6%) scale(.94); z-index: 2; }
.demo-screens[data-active="3"] > .screen[data-k="3"] { transform: none; z-index: 3; }
.demo-screens[data-active="1"] > .screen[data-k="1"],
.demo-screens[data-active="2"] > .screen[data-k="2"],
.demo-screens[data-active="3"] > .screen[data-k="3"] { opacity: 1; }

.demo-steps { grid-column: 8 / span 5; padding: 6vh 0 16vh; }
.step {
  min-height: 62vh; display: flex; flex-direction: column; justify-content: center;
  opacity: .3; transition: opacity .5s var(--ease-soft);
}
.step-points { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; max-width: 42ch; }
.step-points li {
  position: relative; padding-inline-start: 26px; color: var(--on-dark); font-size: 16px; line-height: 1.45;
}
.step-points li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 10px; width: 14px; height: 2px; background: var(--red);
}
.step.is-active { opacity: 1; }
.step h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin-bottom: 16px; color: #fff; }
.step p { color: var(--on-dark-2); max-width: 40ch; font-size: 17px; }

/* Demo: POS lines appear, paid stamp */
.ds-line { opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease-out); }
.screen-pos.is-live .ds-line[data-n="1"] { opacity: 1; transform: none; transition-delay: .3s; }
.screen-pos.is-live .ds-line[data-n="2"] { opacity: 1; transform: none; transition-delay: .7s; }
.ds-total { opacity: 0; transition: opacity .4s 1s; }
.screen-pos.is-live .ds-total { opacity: 1; }
.ds-paid {
  align-self: flex-start; font-weight: 700; font-size: 12px; color: var(--red);
  border: 2px solid var(--red); border-radius: 6px; padding: 5px 10px;
  transform: scale(1.6) rotate(-8deg); opacity: 0;
  transition: transform .45s cubic-bezier(.2, 1.4, .4, 1) 1.4s, opacity .3s 1.4s;
}
.screen-pos.is-live .ds-paid { transform: scale(1) rotate(-4deg); opacity: 1; }
.screen-pos .screen-body { position: relative; }
.screen-pos .ds-paid { position: absolute; inset-inline-end: 22px; top: 46%; }
.ds-pay { display: flex; gap: 8px; margin-top: auto; }
.ds-pay span { flex: 1; text-align: center; padding: 9px 0; border-radius: 6px; background: var(--surface); font-weight: 600; font-size: 12px; }
.ds-pay span.on { background: var(--red); color: #fff; }
.ds-total { margin-top: 0; }

/* Demo: inventory numbers */
.di-row b.is-changing { color: var(--red); }

/* Demo: dashboard */
.de-note {
  font-size: 11px; color: var(--crimson); background: #fde8e9; border-radius: 6px; padding: 8px 10px;
  opacity: 0; transform: translateY(6px); transition: opacity .4s 1.2s, transform .4s var(--ease-out) 1.2s;
}
.screen-erp.is-live .de-note { opacity: 1; transform: none; }

/* =========================================================
   Process
   ========================================================= */
.process { padding: clamp(80px, 10vw, 140px) 0; }
.stages {
  width: min(var(--max), 100%); margin: 64px auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; position: relative;
}
.stages::before {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 2px;
  background: var(--rule);
}
.stages::after {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform 1.6s var(--ease-out);
}
.stages.is-in::after { transform: scaleX(1); }
.stage { padding-top: 28px; position: relative; }
.stage::before {
  content: ""; position: absolute; top: -5px; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--rule);
  transition: border-color .4s, background-color .4s;
}
.stages.is-in .stage::before { border-color: var(--red); background: var(--red); }
.stages.is-in .stage:nth-child(2)::before { transition-delay: .4s; }
.stages.is-in .stage:nth-child(3)::before { transition-delay: .8s; }
.stages.is-in .stage:nth-child(4)::before { transition-delay: 1.2s; }
.stage-n { display: block; font-stretch: var(--wide); font-weight: 800; color: var(--red); font-size: 14px; letter-spacing: .02em; margin-bottom: 18px; }
.stage h3 { margin-bottom: 12px; }
.stage p { color: var(--ink-2); font-size: 16px; max-width: 30ch; }

/* =========================================================
   Why
   ========================================================= */
.why { padding: 0 0 clamp(80px, 10vw, 140px); }
.why-grid {
  width: min(var(--max), 100%); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px;
}
.why-item { border-inline-start: 1px solid var(--rule); padding: 8px 24px; }
.why-item:first-child { border-inline-start-color: var(--red); }
.why-item h3 { margin-bottom: 14px; }
.why-item p { color: var(--ink-2); font-size: 16px; max-width: 34ch; }

/* =========================================================
   Contact
   ========================================================= */
.contact { position: relative; background: var(--red); color: #fff; overflow: hidden; padding: clamp(80px, 10vw, 140px) 0; }
.contact-bg {
  position: absolute; left: -3%; bottom: -5%; width: 36%; max-width: 640px; min-width: 340px;
  color: #fff; opacity: .34; pointer-events: none;
}
.contact-bg .mark { color: #fff; }
.contact-bg .ln { opacity: 1; transform: none; animation: none; }
.contact-inner {
  position: relative; width: min(var(--max), 100%); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start;
}
.contact-copy { grid-column: 1 / span 5; }
.contact-copy h2 { margin-bottom: 24px; }
.contact-copy p { max-width: 38ch; color: #fde6e7; font-size: 17px; }
.whatsapp {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 36px; font-weight: 600;
  padding: 12px 18px 12px 14px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 8px;
  transition: background-color .25s, border-color .25s;
}
.whatsapp:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.whatsapp svg { width: 22px; height: 22px; }

.form { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: #fff; }
.field legend { padding: 0; margin-bottom: 10px; }
.field input[type="text"], .field textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 0; border-radius: 8px; padding: 14px 16px; width: 100%;
  box-shadow: inset 0 0 0 1px rgba(56, 4, 14, .15);
}
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.field textarea { resize: vertical; min-height: 110px; }
.chips { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.chips legend { float: left; width: 100%; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span {
  display: inline-block; padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid rgba(255, 255, 255, .6); color: #fff;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chips input:checked + span { background: #fff; color: var(--red); border-color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--maroon); outline-offset: 2px; }
.form .btn { align-self: flex-start; }
.form-error { color: #fff; background: var(--maroon); padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.form-done { font-size: 17px; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--maroon); border-radius: 8px; scroll-margin-top: calc(var(--nav-h) + 24px); outline: none; }
.form-done-alt { margin-top: 12px; font-size: 14px; color: var(--on-dark-2); line-height: 1.6; }
.form-done-alt a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.contact :focus-visible { outline-color: #fff; }

/* =========================================================
   Footer
   ========================================================= */
.footer { background: var(--surface); padding: 64px 0 28px; }
.footer-inner {
  width: min(var(--max), 100%); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px;
}
.footer-brand { grid-column: 1 / span 6; }
.footer-brand img { width: 300px; height: auto; }
.footer-brand .lockup-ar { width: 210px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); }
.footer-col:nth-child(2) { grid-column: 7 / span 3; }
.footer-col:nth-child(3) { grid-column: 10 / span 3; }
.footer-col h4 { font-size: 13px; font-stretch: var(--wide); color: var(--ink); margin-bottom: 6px; }
.footer-col a:hover { color: var(--red); }
.footer-base {
  width: min(var(--max), 100%); margin: 56px auto 0; padding: 20px var(--gutter) 0;
  border-top: 1px solid var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--ink-2);
}

/* =========================================================
   Intro curtain + hero line field
   ========================================================= */
body.is-intro { overflow: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 60; background: var(--maroon);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 36px;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s cubic-bezier(.7, 0, .2, 1);
}
.js .intro { display: flex; }
.intro.is-leaving { clip-path: inset(0 0 100% 0); }
.intro.is-done { display: none; }
.intro-spacer { width: min(52vw, 420px); aspect-ratio: 504.55 / 451.91; }
.intro-text {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-out);
}
.intro.is-text .intro-text { opacity: 1; transform: none; }
.intro.is-leaving .intro-text { opacity: 0; transition-duration: .3s; }
.intro-wordmark { height: 30px; color: #fff; }
.intro-wordmark.wordmark-ar { height: 50px; }
.intro-text span { font-size: 14px; color: var(--on-dark-2); letter-spacing: .01em; }

.hero-field {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 10%, rgba(0,0,0,.22) 38%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 10%, rgba(0,0,0,.22) 38%, #000 62%);
}

/* =========================================================
   Arabic (default) + right-to-left
   ========================================================= */
html[lang="ar"] {
  --font: "IBM Plex Sans Arabic", "Archivo", system-ui, sans-serif;
  --font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
  --wide: 100%;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { letter-spacing: 0; line-height: 1.2; }
html[lang="ar"] h2 { font-size: clamp(2rem, 4.4vw, 3.9rem); }
html[lang="ar"] .hero-title { font-size: clamp(2.5rem, 6.2vw, 6.3rem); line-height: 1.18; }
html[lang="ar"] .hero-title .line { padding-bottom: .16em; margin-bottom: -.16em; }
html[lang="ar"] .service-title, html[lang="ar"] .work-meta strong, html[lang="ar"] .footer-col h4,
html[lang="ar"] .mp-total b, html[lang="ar"] .ds-total b, html[lang="ar"] .me-kpis b, html[lang="ar"] .de-kpis b,
html[lang="ar"] .stage-n { font-family: var(--font-head); font-stretch: normal; letter-spacing: 0; }
html[lang="ar"] .service-title { line-height: 1.3; }
html[lang="ar"] .step h3 { line-height: 1.3; }
html[lang="ar"] .btn { letter-spacing: 0; }
html[lang="ar"] body, html[lang="ar"] .hero-sub, html[lang="ar"] .section-head p { line-height: 1.75; }
html[lang="ar"] .step p, html[lang="ar"] .stage p, html[lang="ar"] .why-item p, html[lang="ar"] .contact-copy p { line-height: 1.75; }
html[lang="ar"] .ds-paid { transform: scale(1) rotate(4deg); }
html[lang="ar"] .screen-pos.is-live .ds-paid { transform: scale(1) rotate(4deg); }
html[lang="ar"] .intro-text span { font-size: 15px; }
[dir="rtl"] .ticker-track { animation-name: ticker-rtl; padding-left: 0; padding-right: 36px; }
@keyframes ticker-rtl { to { transform: translateX(50%); } }
[dir="rtl"] .hero-field {
  -webkit-mask-image: linear-gradient(270deg, transparent 10%, rgba(0,0,0,.22) 38%, #000 62%);
  mask-image: linear-gradient(270deg, transparent 10%, rgba(0,0,0,.22) 38%, #000 62%);
}
[dir="rtl"] .contact-bg { left: auto; right: -3%; }
[dir="rtl"] .stages::after, [dir="rtl"] .nav-links a::after, [dir="rtl"] .service::before { transform-origin: right; }
[dir="rtl"] .footer-col a, [dir="rtl"] .footer-col span { font-feature-settings: normal; }
[dir="rtl"] .wordmark { margin-inline-start: 0; }
[dir="rtl"] .whatsapp { padding: 12px 14px 12px 18px; }
[dir="rtl"] .footer-col [dir="ltr"] { text-align: right; }
.nav.is-open + .flying-mark { visibility: hidden; }

.lang-toggle {
  font-family: "IBM Plex Sans Arabic", var(--font); font-weight: 600; font-size: 14px; line-height: 1;
  padding: 10px 14px; border: 1px solid var(--rule); border-radius: 999px; color: inherit;
  transition: border-color .25s, background-color .25s, color .25s;
}
.lang-toggle:hover { border-color: var(--ink); }
.nav.is-dark .lang-toggle { border-color: rgba(255, 255, 255, .4); }
.nav.is-dark .lang-toggle:hover { border-color: #fff; }
.lang-toggle-mobile { display: none; }
html.js:not(.i18n-ready) main, html.js:not(.i18n-ready) .nav, html.js:not(.i18n-ready) .footer { visibility: hidden; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-item, .work-item-wide { grid-column: span 1; }
  .hero-copy { grid-column: 1 / span 7; }
  .hero-mark-slot { grid-column: 8 / span 5; }
  .section-head h2 { grid-column: 1 / span 12; }
  .section-head p { grid-column: 1 / span 8; margin-top: 20px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav-links, .nav-cta { display: none; }
  .nav-inner { gap: 10px; }
  .lang-toggle { padding: 8px 12px; font-size: 13px; }
  .nav-toggle { display: block; }
  .nav.is-open { background: var(--paper); color: var(--ink); }
  .nav.is-open::before { opacity: 0; }
  .nav.is-open .wordmark, .nav.is-dark.is-open .wordmark { color: var(--ink); }
  .nav.is-open .nav-toggle span, .nav.is-dark.is-open .nav-toggle span { background: var(--ink); }
  .nav.is-open .brand-mark .mark, .nav.is-dark.is-open .brand-mark .mark { color: var(--red); }

  .hero-inner { grid-template-columns: 1fr; align-items: start; }
  .hero-copy { grid-column: 1; padding: 24px 0 0; order: 2; }
  .hero-mark-slot { grid-column: 1; order: 1; width: min(68vw, 360px); margin: 24px 0 0; margin-inline-start: auto; }
  .hero-title { font-size: clamp(2.6rem, 11vw, 4.6rem); }
  .hero-actions { gap: 20px; }
  .hero-foot { padding-top: 40px; }
  .hero-field {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 78%);
    mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 78%);
  }
  .intro-spacer { width: min(62vw, 300px); }

  .build-grid { grid-template-columns: 1fr; }
  .services { grid-column: 1; }
  .preview { display: none; }
  .service-mock-mobile { display: grid; grid-template-rows: 0fr; overflow: hidden; transition: grid-template-rows .9s var(--ease-out); }
  .service-mock-mobile > .mock { min-height: 0; overflow: hidden; margin-bottom: 0; transition: margin-bottom .9s var(--ease-out); }
  .service.is-active .service-mock-mobile { grid-template-rows: 1fr; }
  .service.is-active .service-mock-mobile > .mock { margin-bottom: 26px; }
  .service-mock-mobile .mock { box-shadow: none; aspect-ratio: 4 / 3; }
  .service-btn { position: relative; padding-inline-end: 44px; }
  .service-plus { display: block; position: absolute; inset-inline-end: 2px; top: 30px; width: 22px; height: 22px; }
  .service-plus::before, .service-plus::after {
    content: ""; position: absolute; background: var(--ink); border-radius: 1px;
    transition: transform .45s var(--ease-out), background-color .3s;
  }
  .service-plus::before { left: 0; right: 0; top: 10px; height: 2px; }
  .service-plus::after { top: 0; bottom: 0; left: 10px; width: 2px; }
  .service.is-active .service-plus::before, .service.is-active .service-plus::after { background: var(--red); }
  .service.is-active .service-plus::after { transform: scaleY(0); }
  .screen-pos .ds-paid { position: absolute; inset-inline-end: 16px; top: 48%; }

  .work-grid { grid-template-columns: 1fr; gap: 32px; }
  .work-item, .work-item-wide { grid-column: 1; }
  .work-shot { aspect-ratio: 16 / 11; }

  .demo-body { grid-template-columns: 1fr; }
  .demo-screens {
    grid-column: 1; top: var(--nav-h); z-index: 2; display: block;
    height: clamp(330px, 46vh, 400px); padding: 0; background: var(--maroon);
  }
  .demo-screens > .screen {
    position: absolute; left: 0; right: 0; top: 28px; margin: auto;
    width: 86%; height: clamp(272px, 40vh, 330px); aspect-ratio: auto;
  }
  .demo-screens > .screen[data-k="2"] { transform: translate(7%, -7%) scale(.94); }
  .demo-screens > .screen[data-k="3"] { transform: translate(14%, -14%) scale(.88); }
  .demo-screens[data-active="2"] > .screen[data-k="1"] { transform: translate(-7%, 7%) scale(.94); }
  .demo-screens[data-active="2"] > .screen[data-k="3"] { transform: translate(7%, -7%) scale(.94); }
  .demo-screens[data-active="3"] > .screen[data-k="1"] { transform: translate(-14%, 14%) scale(.88); }
  .demo-screens[data-active="3"] > .screen[data-k="2"] { transform: translate(-7%, 7%) scale(.94); }
  .demo-steps { grid-column: 1; padding-bottom: 10vh; }
  .step { min-height: 0; padding: 8vh 0 12vh; justify-content: flex-start; }
  .step-points { margin-top: 20px; gap: 12px; }
  .ds-pay { margin-top: auto; }

  .stages { grid-template-columns: 1fr; row-gap: 36px; }
  .stages::before, .stages::after { display: none; }
  .stage { padding-top: 0; padding-inline-start: 28px; border-inline-start: 2px solid var(--rule); }
  .stage::before { inset-inline-start: -7px; top: 2px; }

  .why-grid { grid-template-columns: 1fr; row-gap: 36px; }
  .why-item { padding: 0; padding-inline-start: 20px; }

  .contact-inner { grid-template-columns: 1fr; row-gap: 48px; }
  .contact-copy, .form { grid-column: 1; }
  .contact-bg { width: 80%; left: auto; right: -28%; bottom: auto; top: 1%; opacity: .22; }
  [dir="rtl"] .contact-bg { right: auto; left: -28%; }
  html[lang="ar"] .hero-title { font-size: clamp(2.3rem, 9.5vw, 4.2rem); }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / span 2; }
  .footer-col:nth-child(2), .footer-col:nth-child(3) { grid-column: auto; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero-sub { font-size: 1rem; }
  .btn-lg { height: 54px; padding: 0 24px; }
  .mock-bar, .screen-bar { height: 38px; padding: 0 12px; }
  .mock-body, .screen-body { padding: 12px; }
  .ms-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mi-row, .di-row { grid-template-columns: 1fr 60px 30px auto; gap: 8px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .hero-title .line > span { transform: none; }
  .hero-sub, .hero-actions, .hero-foot { opacity: 1; }
  .flying-mark .ln { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  .js .intro { display: none; }
  .js .hero-title .line > span { transform: none; }
  .js .hero-sub, .js .hero-actions, .js .hero-foot { opacity: 1; }
  .hero-field { display: none; }
}
