/* ==========================================================================
   أوج · المنتجات الرقمية — dark theme
   Deep navy canvas, glass surfaces, and each product's Awj colour as a glow.
   Fonts: Alexandria (headings), IBM Plex Sans Arabic (body).
   Layout is RTL; only CSS logical properties are used for direction.
   ========================================================================== */

:root {
  /* Awj palette (product colours and accents) */
  --navy: #003059;
  --red: #ED4E38;
  --sky: #98D8F6;
  --purple: #594B9F;
  --blue: #77A5D8;
  --teal: #00AFA9;
  --yellow: #FFB600;
  --coral: #F37B74;

  /* Dark canvas */
  --bg: #061A2E;
  --bg-deep: #03101E;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --heading: #FFFFFF;
  --text: #D9E4EF;
  --muted: #93A7BC;
  --accent: var(--sky);

  --f-head: "Alexandria", "IBM Plex Sans Arabic", Tahoma, "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Alexandria", Tahoma, "Segoe UI", system-ui, sans-serif;

  --wrap: 1200px;
  --gut: 16px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 10px 30px -18px rgba(0, 0, 0, .6);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 24px 50px -20px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.22, .75, .25, 1);
  --nav-h: 68px;

  color-scheme: dark;

  /* Theme tokens (dark values; light overrides below) */
  --accent-rgb: 152 216 246;
  --orb-1: rgba(0, 175, 169, .32);
  --orb-2: rgba(237, 78, 56, .2);
  --hero-title: linear-gradient(180deg, #FFFFFF 30%, #B9DDF2);
  --nav-bg: rgba(6, 26, 46, .78);
  --band-bg: rgba(255, 255, 255, .02);
  --kpi-bg: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  --badge-border: rgba(255, 182, 0, .4);
  --badge-bg: rgba(255, 182, 0, .14);
  --badge-text: #FFD56E;
  --note-text: #FFE3A0;
  --teal-text: #7FE3DE;
  --input-bg: rgba(3, 16, 30, .45);
  --placeholder: rgba(147, 167, 188, .6);
  --error: #FF9A8A;
  --error-border: #FF7A66;
  --error-soft: rgba(255, 122, 102, .6);
  --modal-bg: #0A2238;
  --backdrop: rgba(3, 16, 30, .74);
  --close-bg: rgba(6, 26, 46, .7);
  --close-bg-hover: rgba(255, 255, 255, .14);
  --pager-bg: rgba(3, 16, 30, .35);
}

@media (min-width: 768px) {
  :root { --gut: 32px; }
}

/* ---------- Light theme ----------
   Toggled with <html data-theme="light"> (site.js). Dark stays the default. */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #F3F7FB;
  --bg-deep: #E6EEF6;
  --surface: #FFFFFF;
  --surface-2: #EEF4F9;
  --line: rgba(0, 48, 89, .1);
  --line-strong: rgba(0, 48, 89, .2);
  --heading: #003059;
  --text: #2E3B48;
  --muted: #5B6773;
  --accent: #0B6FA4;
  --accent-rgb: 11 111 164;
  --shadow: 0 1px 2px rgba(0, 48, 89, .05), 0 10px 30px -18px rgba(0, 48, 89, .28);
  --shadow-lg: 0 2px 4px rgba(0, 48, 89, .05), 0 24px 50px -20px rgba(0, 48, 89, .35);

  --orb-1: rgba(0, 175, 169, .16);
  --orb-2: rgba(237, 78, 56, .08);
  --hero-title: linear-gradient(180deg, #003059 30%, #0B4273);
  --nav-bg: rgba(255, 255, 255, .85);
  --band-bg: rgba(0, 48, 89, .025);
  --kpi-bg: linear-gradient(160deg, #FFFFFF, #F1F6FB);
  --badge-border: #FFDF8A;
  --badge-bg: #FFF4D6;
  --badge-text: #7A5300;
  --note-text: #6B4A00;
  --teal-text: #00706B;
  --input-bg: #FFFFFF;
  --placeholder: rgba(91, 103, 115, .7);
  --error: #B42D1A;
  --error-border: #E0553F;
  --error-soft: rgba(224, 85, 63, .5);
  --modal-bg: #FFFFFF;
  --backdrop: rgba(0, 33, 63, .45);
  --close-bg: rgba(255, 255, 255, .9);
  --close-bg-hover: #EEF4F9;
  --pager-bg: #F6F9FC;
}

/* Product colours: dark pair by default, light pair in the light theme (ProductTheme.Vars). */
[data-pc] { --pc: var(--pc-d); --pi: var(--pi-d); }
:root[data-theme="light"] [data-pc] { --pc: var(--pc-l); --pi: var(--pi-l); }

/* Glows that only read well on a dark canvas */
:root[data-theme="light"] .spectrum li { box-shadow: none; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  min-block-size: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.85;
}

/* Ambient glows behind the whole page (fixed, decorative) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 90% -10%, rgb(var(--accent-rgb) / .12), transparent 60%),
    radial-gradient(50vmax 40vmax at 0% 110%, rgba(89, 75, 159, .16), transparent 60%),
    var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--f-head);
  color: var(--heading);
  line-height: 1.45;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }
svg { display: block; }

::selection { background: rgb(var(--accent-rgb) / .3); color: var(--heading); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus { outline: none; }

[hidden] { display: none !important; }

.wrap {
  max-inline-size: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.narrow { max-inline-size: calc(900px + 2 * var(--gut)); }

.skip-link {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 200;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}

.skip-link:focus { transform: none; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  z-index: 100;
  pointer-events: none;
}

.progress-bar {
  display: block;
  block-size: 100%;
  inline-size: 0;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--teal), var(--accent));
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / .6);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-block-end: 1px solid var(--line);
}

/* Two soft colour orbs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.hero::before {
  inline-size: 420px;
  block-size: 420px;
  inset-block-start: -160px;
  inset-inline-end: -120px;
  background: var(--orb-1);
}

.hero::after {
  inline-size: 360px;
  block-size: 360px;
  inset-block-end: -200px;
  inset-inline-end: 30%;
  background: var(--orb-2);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(48px, 9vw, 112px) clamp(40px, 6vw, 72px);
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px 0;
}

.hero-top .brand-name { font-size: 1.6rem; }

.hero-toplink {
  color: var(--heading);
  font-family: var(--f-head);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.hero h1 {
  margin-block: 0 14px;
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.25;
  max-inline-size: 14em;
  background: var(--hero-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-inline-size: 38em;
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-block-start: 30px;
}

.btn.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(237, 78, 56, .7);
}

.btn.btn-red:hover { box-shadow: 0 14px 30px -10px rgba(237, 78, 56, .85); }

.spectrum {
  display: flex;
  gap: 6px;
  max-inline-size: 44em;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.spectrum li {
  flex: 1;
  block-size: 6px;
  border-radius: 999px;
  background: var(--pc);
  box-shadow: 0 0 14px var(--pc);
}

/* ---------- Sticky nav ---------- */
.topnav {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  border-block-end: 1px solid var(--line);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.topnav-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-block-size: var(--nav-h);
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Awj logo (Views/Shared/_Logo.cshtml): main shapes follow the theme, accent stays red. */
.logo { display: block; flex: none; inline-size: auto; }
.logo .lg-m { fill: var(--heading); }
.logo .lg-a { fill: var(--red); }

.logo-nav { block-size: 44px; }
.logo-hero { block-size: 64px; }
.logo-footer { block-size: 48px; }

@media (max-width: 640px) {
  .logo-hero { block-size: 52px; }
  .logo-nav { block-size: 40px; }
}

.brand-name {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--heading);
  line-height: 1.2;
}

/* Products bar: one line that scrolls sideways inside itself when it does not fit. */
.navlinks {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 2px;
  min-inline-size: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.navlinks::-webkit-scrollbar { display: none; }

.navlinks li { flex: none; }

.navlinks a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: .84rem;
  line-height: 1.6;
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.navlinks a:hover { color: var(--heading); }

/* Product colour dot before each product name */
.nav-product::before {
  content: "";
  flex: none;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 2px;
  background: var(--pc);
}

.navlinks a.is-active {
  background: var(--heading);
  color: var(--bg);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }

.band {
  border-block: 1px solid var(--line);
  background: var(--band-bg);
}

.section-title {
  margin-block: 12px 10px;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.35;
}

.lead {
  max-inline-size: 64ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--heading);
  color: var(--bg);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgb(var(--accent-rgb) / .6);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px rgb(var(--accent-rgb) / .8);
}

/* Product colour tile (icon on --pc), with a glow in the same colour */
.tile {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 50px;
  block-size: 50px;
  border-radius: 14px;
  background: var(--pc, var(--accent));
  color: var(--pi, var(--navy));
  box-shadow: 0 10px 28px -8px var(--pc, var(--accent));
}

.tile .icon { inline-size: 26px; block-size: 26px; }

.tile-big {
  inline-size: 72px;
  block-size: 72px;
  border-radius: 20px;
  box-shadow: 0 16px 44px -10px var(--pc);
}

.tile-big .icon { inline-size: 36px; block-size: 36px; }

/* ---------- Zigzag rows ----------
   .zrow = two columns: .zrow-aside (heading / visual) and .zrow-main (content).
   In RTL the first column is on the right; .zrow--flip moves the aside to the left.
   Below 860px every row stacks into one column with the aside first. */
.zlist {
  display: grid;
  gap: 20px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.zrow {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 24px clamp(28px, 5vw, 72px);
  padding-block: clamp(36px, 5vw, 60px);
  border-block-start: 1px solid var(--line);
}

.zrow--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.zrow--flip > .zrow-aside { order: 2; text-align: end; }

.zrow--open { border-block-start: 0; padding-block-start: 0; }

.zlist > .zrow:first-child { border-block-start: 0; }

.subhead {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.4;
}

@media (min-width: 861px) {
  .zlist--pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zlist--pairs > li { display: flex; }
  .zlist--pairs .prow { inline-size: 100%; }
}

.prow,
.prow.zrow--flip { padding: 0; }

.prow { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
.prow.zrow--flip { grid-template-columns: minmax(0, 9fr) minmax(0, 3fr); }

.prow {
  position: relative;
  column-gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}

.prow:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

/* Colour panel: glowing tile + outlined number */
.pvis {
  position: relative;
  display: grid;
  place-items: center;
  min-block-size: 150px;
  overflow: hidden;
  border-inline-end: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--pc) 40%, transparent), transparent 64%),
    color-mix(in srgb, var(--pc) 9%, var(--bg));
}

.zrow--flip > .pvis {
  border-inline-end: 0;
  border-inline-start: 1px solid var(--line);
  text-align: start;
}

.pvis-num {
  position: absolute;
  inset-block-end: -.16em;
  inset-inline-start: 14px;
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(3.6rem, 6vw, 5rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px color-mix(in srgb, var(--pc) 70%, transparent);
  pointer-events: none;
}

.zrow--flip .pvis-num { inset-inline-start: auto; inset-inline-end: 14px; }

.tile-xl {
  position: relative;
  inline-size: 68px;
  block-size: 68px;
  border-radius: 20px;
  box-shadow: 0 16px 40px -10px var(--pc);
  transition: transform .45s var(--ease);
}

.tile-xl .icon { inline-size: 34px; block-size: 34px; }

.prow:hover .tile-xl { transform: scale(1.06) rotate(-4deg); }

.prow-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  padding: 20px clamp(20px, 3vw, 32px);
}

.prow-name {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.4;
}

.prow-summary {
  color: var(--muted);
  font-size: .98rem;
}

/* ---------- Logos strip ---------- */
.logos { padding-block: 28px 32px; }

.logos-title {
  margin-block-end: 18px;
  color: var(--muted);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: .95rem;
}

.client-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-marks--strip { gap: 14px 28px; }

/* Placeholder until a logo file is set: the name, styled as a quiet chip */
.client-name {
  display: inline-block;
  padding: 6px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: .9rem;
}

/* Logos are drawn for a white ground, so they keep one in every theme. */
.client-logo {
  display: block;
  box-sizing: content-box;
  block-size: 40px;
  inline-size: auto;
  max-inline-size: 150px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #FFFFFF;
  object-fit: contain;
}

/* ---------- Goal cards (extras on .prow) ---------- */
.prow-goal {
  color: var(--pc);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: .95rem;
}

:root[data-theme="light"] .prow-goal { color: color-mix(in srgb, var(--pc) 70%, #003059); }

.prow-go {
  align-self: flex-end;
  margin-block-start: 6px;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform .3s var(--ease), color .3s var(--ease);
}

.prow:hover .prow-go { color: var(--heading); transform: translateX(-4px); }

/* ---------- Why (what the products share) ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.why-card { padding: 22px; }

.why-n {
  display: block;
  margin-block-end: 8px;
  color: var(--accent);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: .9rem;
}

.why-card h3 {
  margin-block-end: 6px;
  font-size: 1.1rem;
  font-weight: 700;
}

.why-card p { color: var(--muted); font-size: .97rem; }

@media (max-width: 560px) {
  .why-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- What you get ---------- */
.zrow-aside .btn { margin-block-start: 18px; }

.gets {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gets-mark {
  flex: none;
  inline-size: 22px;
  block-size: 22px;
  margin-block-start: 4px;
  border-radius: 50%;
  background: rgba(0, 175, 169, .16);
  box-shadow: inset 0 0 0 1px rgba(0, 175, 169, .5);
  position: relative;
}

.gets-mark::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
}

.gets strong { color: var(--heading); font-weight: 600; }

/* Journey: vertical timeline */
.journey {
  counter-reset: j;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-step {
  counter-increment: j;
  position: relative;
  display: flex;
  gap: 18px;
  padding-block-end: 28px;
}

.journey-step:last-child { padding-block-end: 0; }

.journey-step::after {
  content: "";
  position: absolute;
  inset-block: 44px 6px;
  inset-inline-start: 19px;
  inline-size: 2px;
  border-radius: 2px;
  background: linear-gradient(rgb(var(--accent-rgb) / .5), rgb(var(--accent-rgb) / .08));
}

.journey-step:last-child::after { display: none; }

.journey-n {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border: 1px solid rgb(var(--accent-rgb) / .5);
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / .12);
  color: var(--accent);
  font-family: var(--f-head);
  font-weight: 600;
}

.journey-step:last-child .journey-n {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0, 175, 169, .6);
}

.journey-n::before { content: counter(j); }

.journey-step h3 {
  margin-block: 6px 4px;
  font-size: 1.08rem;
  font-weight: 600;
}

.journey-step p { color: var(--muted); font-size: .96rem; }

/* Zigzag collapses to one column on narrow screens */
@media (max-width: 860px) {
  .zrow,
  .zrow--flip { grid-template-columns: minmax(0, 1fr); }

  .zrow--flip > .zrow-aside { order: 0; text-align: start; }

  .prow { row-gap: 0; }

  .prow,
  .prow.zrow--flip { grid-template-columns: minmax(0, 1fr); }

  .pvis,
  .zrow--flip > .pvis {
    min-block-size: 110px;
    border-inline: 0;
    border-block-end: 1px solid var(--line);
  }

  .zrow--flip .pvis-num { inset-inline-end: auto; inset-inline-start: 22px; }

  .tile-xl { inline-size: 56px; block-size: 56px; border-radius: 17px; }
  .tile-xl .icon { inline-size: 28px; block-size: 28px; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 32px;
  border-block-start: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--muted);
}

.footer-title {
  color: var(--heading);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

/* ---------- Details page ---------- */
.dhead {
  position: relative;
  overflow: hidden;
  border-block-end: 1px solid var(--line);
}

/* Big glow in the product's colour */
.dhead::before {
  content: "";
  position: absolute;
  inset-block-start: -220px;
  inset-inline-start: 50%;
  inline-size: 560px;
  block-size: 440px;
  border-radius: 50%;
  background: var(--pc);
  opacity: .22;
  filter: blur(90px);
  translate: 50% 0;
  pointer-events: none;
}

.dhead .wrap {
  position: relative;
  padding-block: 30px 48px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .92rem;
}

.crumbs a {
  color: var(--heading);
  text-underline-offset: 5px;
  text-decoration-color: var(--line-strong);
}

.crumbs a:hover { text-decoration-color: var(--heading); }

.dhead-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dhead h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.35;
}

.dpage {
  display: grid;
  gap: 24px;
  padding-block: 32px 64px;
}

.dpage .pm-body { padding: 0; }

.block-lead {
  color: var(--heading);
  font-size: 1.12rem;
  line-height: 1.95;
}

.note {
  margin-block-start: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 182, 0, .35);
  border-inline-start: 4px solid var(--yellow);
  border-radius: 12px;
  background: rgba(255, 182, 0, .1);
  color: var(--note-text);
}

.note strong { font-weight: 700; }

.services {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.services li {
  position: relative;
  padding-block: 10px;
  padding-inline-start: 22px;
  border-block-end: 1px solid var(--line);
}

.services li:last-child { border-block-end: 0; }

.services li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  inset-block-start: calc(10px + .8em);
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

/* Pager: previous | position | next (RTL: previous on the right) */
.pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  margin-block-start: 8px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--heading);
  text-decoration: none;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
}

.pager-link:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.pager-next { text-align: end; }

.pager-dir {
  color: var(--muted);
  font-family: var(--f-head);
  font-size: .85rem;
  font-weight: 500;
}

.pager-name {
  font-family: var(--f-head);
  font-weight: 600;
}

.pager-pos {
  align-self: center;
  color: var(--muted);
  font-family: var(--f-head);
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager-pos { grid-column: 1 / -1; grid-row: 1; text-align: center; }
}

/* ---------- Interest form ---------- */
.interest { align-items: start; }

.iform {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 32px);
}

.iform .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.lab {
  padding: 0;
  color: var(--heading);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: .92rem;
}

.lab small {
  color: var(--muted);
  font-family: var(--f-body);
  font-weight: 400;
}

.field input:not([type=checkbox]),
.field textarea {
  inline-size: 100%;
  min-block-size: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--heading);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.field textarea { min-block-size: 96px; resize: vertical; }

/* LTR inputs (phone, email) still line up with the RTL form */
.field input[dir=ltr] { text-align: end; }

.field input::placeholder { color: var(--placeholder); }

.field input:not([type=checkbox]):focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .2);
}

.field .err {
  display: none;
  color: var(--error);
  font-size: .86rem;
}

.field.bad .err { display: block; }

.field.bad input:not([type=checkbox]),
.field.bad textarea { border-color: var(--error-border); }

/* Product choices as toggle chips */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: .92rem;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}

.choice::before {
  content: "";
  flex: none;
  inline-size: 9px;
  block-size: 9px;
  border-radius: 50%;
  background: var(--pc);
}

.choice input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice:hover { border-color: var(--pc); }

.choice:has(input:checked) {
  border-color: var(--pc);
  background: color-mix(in srgb, var(--pc) 22%, transparent);
  color: var(--heading);
}

.choice:has(input:checked)::before { box-shadow: 0 0 10px var(--pc); }

.choice:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.field.bad .choice { border-color: var(--error-soft); }

.send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.iform button.btn { border: 0; cursor: pointer; font-size: 1rem; }

/* Summary after "submit" */
.idone h3 { font-size: 1.3rem; font-weight: 700; }

.isum {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 20px;
  margin: 0;
}

.isum dt {
  color: var(--muted);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: .92rem;
}

.isum dd {
  margin: 0;
  color: var(--heading);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.isum dd[dir=ltr] { text-align: end; }

.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.tlink {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-family: var(--f-head);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
  cursor: pointer;
}

.copied { color: var(--teal-text); font-size: .9rem; }

@media (max-width: 560px) {
  .iform .row { grid-template-columns: minmax(0, 1fr); }
  .isum { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .isum dd { margin-block-end: 10px; }
}

/* ---------- Theme toggle ---------- */
.navlinks { margin-inline-start: auto; }

.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .3s var(--ease);
}

.theme-toggle:hover { background: var(--surface-2); transform: rotate(-20deg); }

.theme-toggle .icon { inline-size: 20px; block-size: 20px; }

.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* Narrow screens: the toggle sits on the brand row, links get their own full-width row. */
@media (max-width: 768px) {
  .topnav-inner { flex-wrap: wrap; }
  .theme-toggle { order: 1; margin-inline-start: auto; }
  .navlinks { order: 2; inline-size: 100%; margin-inline-start: 0; }
}

/* ---------- WhatsApp floating button ---------- */
.wa-fab {
  position: fixed;
  z-index: 60;
  inset-block-end: max(20px, env(safe-area-inset-bottom));
  inset-inline-end: 20px;
  display: grid;
  place-items: center;
  inline-size: 58px;
  block-size: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 14px 32px -10px rgba(37, 211, 102, .75), 0 0 0 1px rgba(255, 255, 255, .15) inset;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.wa-fab svg { inline-size: 30px; block-size: 30px; }

.wa-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 38px -10px rgba(37, 211, 102, .9), 0 0 0 1px rgba(255, 255, 255, .2) inset;
}

/* Soft pulse ring to draw the eye (disabled with reduced motion) */
.wa-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: wa-pulse 2.4s var(--ease) infinite;
  pointer-events: none;
}

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 640px) {
  .wa-fab { inline-size: 52px; block-size: 52px; inset-inline-end: 14px; }
  .wa-fab svg { inline-size: 27px; block-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-fab::after { display: none; }
}

/* ---------- Details pop-up ---------- */
html:has(.pmodal[open]) { overflow: hidden; }

.pmodal {
  inline-size: min(920px, 100% - 32px);
  max-inline-size: none;
  max-block-size: min(90dvh, 960px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--modal-bg);
  color: var(--text);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .85);
}

.pmodal[open] {
  display: flex;
  flex-direction: column;
  animation: pm-in .35s var(--ease);
}

.pmodal::backdrop {
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: pm-fade .3s var(--ease);
}

@keyframes pm-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pmodal-content {
  flex: 1;
  min-block-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pmodal-content:focus { outline: none; }

.pmodal-close {
  position: absolute;
  z-index: 2;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  display: grid;
  place-items: center;
  inline-size: 42px;
  block-size: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--close-bg);
  color: var(--heading);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}

.pmodal-close:hover { background: var(--close-bg-hover); transform: rotate(90deg); }

.pmodal-close .icon { inline-size: 20px; block-size: 20px; }

.pm-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 34px clamp(20px, 4vw, 40px) 28px;
  padding-inline-end: 80px;
  border-block-end: 1px solid var(--line);
  background:
    radial-gradient(70% 140% at 85% 0%, color-mix(in srgb, var(--pc) 30%, transparent), transparent 70%);
}

.pm-head::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  block-size: 3px;
  background: var(--pc);
  box-shadow: 0 0 16px var(--pc);
}

.pm-name {
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.35;
}

.pm-body {
  display: grid;
  gap: 28px;
  padding: 28px clamp(20px, 4vw, 40px);
}

.pm-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 12px;
  font-size: 1.05rem;
  font-weight: 700;
}

.pm-title::before {
  content: "";
  flex: none;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--pc);
  box-shadow: 0 0 10px var(--pc);
}

.pm-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

@media (min-width: 760px) {
  .pm-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}

.pm-pager {
  margin: 0;
  padding: 18px clamp(20px, 4vw, 40px) 24px;
  border-block-start: 1px solid var(--line);
  background: var(--pager-bg);
}

.pm-audience p { color: var(--text); }

/* «أبرز إجراءات العمل»: numbered steps joined by a line */
.psteps {
  counter-reset: s;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.psteps li {
  counter-increment: s;
  position: relative;
  min-block-size: 40px;
  padding-block: 6px 12px;
  padding-inline-start: 44px;
}

.psteps li::before {
  content: counter(s);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 4px;
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pc) 22%, transparent);
  box-shadow: inset 0 0 0 1px var(--pc);
  color: var(--heading);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: .85rem;
}

.psteps li::after {
  content: "";
  position: absolute;
  inset-inline-start: 14px;
  inset-block: 36px 0;
  inline-size: 2px;
  background: color-mix(in srgb, var(--pc) 35%, transparent);
}

.psteps li:last-child::after { display: none; }

.pm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

/* ---------- Screenshot gallery ---------- */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.shot img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 1463 / 812;
  object-fit: cover;
  object-position: top;
  border-block-end: 1px solid var(--line);
  background: var(--surface-2);
}

.shot:hover {
  transform: translateY(-2px);
  border-color: var(--pc, var(--line-strong));
  box-shadow: var(--shadow-lg);
}

.shot-cap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  font-size: .88rem;
  line-height: 1.6;
}

.shot-n {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 22px;
  block-size: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pc, var(--accent)) 25%, transparent);
  color: var(--heading);
  font-family: var(--f-head);
  font-size: .75rem;
  font-weight: 600;
}

.screens + .screens { margin-block-start: 6px; }

/* Viewer: the screenshot as large as the screen allows, caption below */
.viewer {
  inline-size: 100vw;
  block-size: 100dvh;
  max-inline-size: none;
  max-block-size: none;
  margin: 0;
  padding: clamp(12px, 3vw, 40px) clamp(12px, 6vw, 96px);
  border: 0;
  background: #030C16;
  color: #fff;
}

.viewer[open] { display: grid; place-items: center; }

.viewer::backdrop { background: #030C16; }

.viewer-fig {
  display: grid;
  gap: 12px;
  justify-items: center;
  max-inline-size: 100%;
  margin: 0;
}

.viewer-fig img {
  display: block;
  max-inline-size: 100%;
  max-block-size: calc(100dvh - 160px);
  inline-size: auto;
  block-size: auto;
  border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  background: #fff;
}

.viewer-fig figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 12px;
  max-inline-size: 70ch;
  text-align: center;
}

.viewer-fig strong { font-family: var(--f-head); font-weight: 600; }

#viewer-desc { color: rgba(255, 255, 255, .72); font-size: .92rem; }

.viewer-count { color: rgba(255, 255, 255, .55); font-size: .85rem; direction: ltr; }

.viewer-btn {
  position: fixed;
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}

.viewer-btn:hover { background: rgba(255, 255, 255, .22); }

.viewer-btn .icon { inline-size: 20px; block-size: 20px; }

.viewer-close { inset-block-start: 16px; inset-inline-end: 16px; }

.viewer-prev,
.viewer-next { inset-block-start: 50%; translate: 0 -50%; }

.viewer-prev { inset-inline-start: 16px; }
.viewer-next { inset-inline-end: 16px; }

.viewer.single .viewer-prev,
.viewer.single .viewer-next,
.viewer.single .viewer-count { display: none; }

@media (max-width: 640px) {
  .viewer-prev,
  .viewer-next { inset-block-start: auto; inset-block-end: 16px; translate: none; }
}

/* Phones: bottom sheet */
@media (max-width: 640px) {
  .pmodal {
    inline-size: 100%;
    max-block-size: 92dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    border-block-end: 0;
  }

  @keyframes pm-in {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }

  .pm-head { padding-block-start: 28px; }
}

/* ---------- Error page ---------- */
.error-card {
  padding: clamp(32px, 6vw, 56px) clamp(20px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.error-code {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(3.4rem, 11vw, 5.6rem);
  line-height: 1.1;
  color: var(--heading);
  text-shadow: 0 0 40px rgba(237, 78, 56, .7);
}

.error-card h1 {
  margin-block: 10px 8px;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

.error-card .lead { margin-inline: auto; margin-block-end: 26px; }

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
  :root { --nav-h: 0px; }

  .topnav { position: static; }

  .topnav-inner { padding-block: 12px; }

  .navlinks a { padding: 5px 12px; font-size: .86rem; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }

  .navlinks { border-radius: 18px; }

  .dhead-row { align-items: flex-start; }

  .tile-big { inline-size: 58px; block-size: 58px; border-radius: 16px; }

  .tile-big .icon { inline-size: 29px; block-size: 29px; }

}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .prow:hover,
  .prow:hover .tile-xl,
  .pager-link:hover,
  .btn:hover { transform: none; }
}
