/* GT4 redesign — "المسرح" (The Stage)
   Every project gets its own lit stage: a tinted surface in the client's colour,
   with the real screens composed in CSS device frames. The page around the stages
   is quiet: cool white paper, deep navy only for the site hero and the closing band.
   Fonts: Alexandria (display) + IBM Plex Sans Arabic (text), both from Google Fonts. */

/* ---------- Tokens ---------- */
:root {
  /* brand */
  --sky: #4BA2D9;          /* logo blue: light, glow, highlights on navy */
  --sky-2: #2F86C4;        /* hover of sky on dark */
  --sky-ink: #1B6AA6;      /* links / buttons on light (4.6:1 on white) */
  --sky-ink-2: #155682;    /* hover of sky-ink */
  --sky-tint: #E8F3FB;
  --navy: #0B1D33;         /* site hero, closing band, footer */
  --navy-2: #122B4C;
  --navy-3: #1B3A63;

  /* neutrals */
  --ink: #0E1B2B;
  --ink-2: #3E4C5C;
  --ink-3: #66748A;
  --paper: #F4F6F9;
  --paper-2: #EAEEF3;
  --white: #FFFFFF;
  --line: #DCE3EA;
  --line-2: #ECF0F4;
  --on-navy: #EAF1F8;
  --on-navy-2: #A9BCD1;

  /* signals */
  --wa: #128C56;           /* WhatsApp button (4.6:1 with white) */
  --wa-2: #0E6E43;
  --focus: #1B6AA6;

  /* type */
  --font-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-text: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --fs-display: clamp(2.375rem, 1.5rem + 3.6vw, 4.5rem);   /* page title / hero */
  --fs-h1: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --fs-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --fs-lead: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-caption: .875rem;

  /* space, radius, shadow */
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --sec: clamp(56px, 8vw, 120px);
  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --sh-float: 0 34px 60px -28px rgba(11, 29, 51, .40), 0 10px 20px -12px rgba(11, 29, 51, .22);
  --sh-float-sm: 0 18px 32px -18px rgba(11, 29, 51, .38), 0 4px 10px -6px rgba(11, 29, 51, .2);
  --sh-edge: 0 0 0 1px rgba(11, 29, 51, .10);
  --sh-card: 0 1px 2px rgba(11, 29, 51, .06), 0 12px 32px -20px rgba(11, 29, 51, .25);

  /* per-project stage, overridden on each .stage via --p (accent) and --p-tint (stage surface) */
  --p: #4BA2D9;
  --p-tint: #E9F3FA;
  --p-deep: #1B3A63;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-body)/1.85 var(--font-text);
  overflow-x: clip;
}
html[dir="ltr"] body { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-ink); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.3; margin: 0 0 .45em; text-wrap: balance; letter-spacing: 0; }
html[dir="ltr"] h1, html[dir="ltr"] h2 { letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.on-navy :focus-visible { outline-color: var(--sky); }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .6em 1.45em; border-radius: var(--r-sm);
  border: 1.5px solid transparent; font: 600 1rem/1.2 var(--font-text);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: .45em 1.05em; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding: .7em 1.8em; font-size: 1.0625rem; }
.btn--primary { background: var(--sky-ink); color: #fff; }
.btn--primary:hover { background: var(--sky-ink-2); color: #fff; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--navy-2); color: #fff; }
.btn--line { border-color: var(--line); background: var(--white); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); color: var(--ink); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-2); color: #fff; }
.btn--sky { background: var(--sky); color: var(--navy); }
.btn--sky:hover { background: #7FBFE6; color: var(--navy); }
.btn--ghost { border-color: rgba(255,255,255,.28); color: var(--on-navy); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* Three dots from the logo: GT4 ● ● ● — the only ornament the site uses. */
.dots { display: inline-flex; gap: .3em; vertical-align: middle; }
.dots i { width: .5em; height: .5em; border-radius: 50%; background: var(--p, var(--sky)); display: block; }
.dots i:nth-child(2) { opacity: .7; } .dots i:nth-child(3) { opacity: .4; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 246, 249, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(220, 227, 234, .9);
}
.site-head--dark { background: rgba(11, 29, 51, .72); border-bottom-color: rgba(255,255,255,.08); color: var(--on-navy); }
.site-head__in { display: flex; align-items: center; gap: 28px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; margin-inline-end: auto; }
.brand img { height: 38px; width: auto; }
.site-head--dark .brand img { filter: brightness(0) invert(1); opacity: .95; }
.nav ul { display: flex; gap: 6px; }
.nav a { display: inline-block; padding: 8px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 1rem; }
.nav a:hover { color: var(--ink); background: rgba(14, 27, 43, .06); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--sky); border-radius: 0; }
.site-head--dark .nav a { color: var(--on-navy-2); }
.site-head--dark .nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-head--dark .nav a[aria-current="page"] { color: #fff; }
.site-head__tools { display: flex; align-items: center; gap: 10px; }
.lang { text-decoration: none; font-weight: 500; color: var(--ink-2); padding: 8px 10px; border-radius: var(--r-sm); font-size: .95rem; }
.lang:hover { color: var(--ink); background: rgba(14, 27, 43, .06); }
.site-head--dark .lang { color: var(--on-navy-2); }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent; color: inherit; cursor: pointer; }
  .menu-btn b { display: block; width: 18px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .site-head__in { gap: 12px; min-height: 64px; }
  .brand img { height: 32px; }
  .lang { display: none; }
}

/* ---------- Sections ---------- */
.sec { padding-block: var(--sec); }
.sec--tight { padding-block: calc(var(--sec) * .6); }
.sec--white { background: var(--white); }
.sec__head { display: grid; gap: 10px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 60ch; }
.sec__head--row { grid-template-columns: 1fr auto; align-items: end; max-width: none; }
.sec__h { font-size: var(--fs-h2); margin: 0; }
.sec__sub { color: var(--ink-2); font-size: var(--fs-lead); margin: 0; max-width: 52ch; }
.sec__more { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; padding-bottom: 4px; }
.sec__more svg { width: 1em; height: 1em; }
html[dir="rtl"] .sec__more svg { transform: scaleX(-1); }
@media (max-width: 640px) { .sec__head--row { grid-template-columns: 1fr; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 88px) clamp(24px, 3vw, 40px); }
.page-hero__kicker { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: var(--fs-small); margin-bottom: 14px; }
.page-hero__h { font-size: var(--fs-display); font-weight: 800; line-height: 1.15; margin-bottom: .3em; max-width: 14ch; }
.page-hero__lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 56ch; margin: 0; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: var(--fs-small); color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--line); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 28px 8px; }
.filters a, .filters button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); color: var(--ink-2);
  text-decoration: none; font-weight: 500; font-size: .95rem; cursor: pointer;
}
.filters a:hover { border-color: var(--ink); color: var(--ink); }
.filters [aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters small { font-weight: 500; color: var(--ink-3); font-size: .8125rem; }
.filters [aria-current] small { color: rgba(255,255,255,.7); }

/* =====================================================================
   THE STAGE — portfolio image treatment
   .stage        tinted surface, fixed aspect, clips the composition
   .frame        CSS device: --browser, --phone, --bare (image already has a photographed device)
   Positions use logical properties so RTL/LTR mirror automatically.
   ===================================================================== */
.stage {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 4 / 3; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--p) 34%, #fff) 0%, transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--p) 10%, #fff), color-mix(in srgb, var(--p) 22%, #fff));
  background-color: var(--p-tint);
  box-shadow: var(--sh-edge);
}
.stage--wide { aspect-ratio: 16 / 9; }
.stage--tall { aspect-ratio: 1 / 1; }
.stage--hero { aspect-ratio: auto; min-height: clamp(360px, 48vw, 640px); border-radius: var(--r-lg); }
/* floor: a soft darker band at the bottom so devices look like they stand on something */
.stage::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--p) 22%, transparent));
}

/* frames */
.frame { position: absolute; z-index: 1; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* browser: thin light chrome + address pill, window 16:10 */
.frame--browser { border-radius: 10px; background: #fff; box-shadow: var(--sh-float), var(--sh-edge); overflow: hidden; }
.frame--browser::before {
  content: ""; display: block; height: 26px; background: #F1F4F8; border-bottom: 1px solid #E2E7ED;
  background-image:
    radial-gradient(circle, #FF5F57 3px, transparent 3.5px), radial-gradient(circle, #FEBC2E 3px, transparent 3.5px), radial-gradient(circle, #28C840 3px, transparent 3.5px),
    linear-gradient(#fff, #fff);
  background-size: 8px 8px, 8px 8px, 8px 8px, 46% 12px;
  background-position: 12px 9px, 26px 9px, 40px 9px, 50% 7px;
  background-repeat: no-repeat;
}
html[dir="rtl"] .frame--browser::before { background-position: right 12px top 9px, right 26px top 9px, right 40px top 9px, 50% 7px; }
.frame--browser .win { aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.frame--browser.frame--sq .win { aspect-ratio: 4 / 3; }
.frame--browser img { height: 100%; }

/* phone: dark bezel, 9:19.5 window */
.frame--phone { aspect-ratio: 9 / 19; border-radius: 13% / 6%; padding: 3%; background: #0F1620; box-shadow: var(--sh-float), inset 0 0 0 1px rgba(255,255,255,.08); }
.frame--phone::before { content: ""; position: absolute; left: 50%; top: 2.2%; width: 28%; height: 2.4%; transform: translateX(-50%); background: #0F1620; border-radius: 999px; z-index: 2; }
.frame--phone .win { width: 100%; height: 100%; border-radius: 11% / 5%; overflow: hidden; background: #fff; }
.frame--phone img { height: 100%; }
.frame--phone.frame--nonotch::before { display: none; }

/* bare: the image already shows a photographed phone/laptop on white.
   Multiply makes the white disappear into the tinted stage; nothing else is drawn. */
.frame--bare { mix-blend-mode: multiply; filter: drop-shadow(0 24px 28px rgba(11, 29, 51, .28)); }
.frame--bare img { object-fit: contain; height: auto; }

/* canonical compositions (the implementer picks one per project; see SPEC) */
.c-web      .frame--browser { inset-inline-start: 7%; top: 11%; width: 86%; }
.c-web-phone .frame--browser { inset-inline-start: 4%; top: 10%; width: 78%; }
.c-web-phone .frame--phone, .c-web-phone .frame--bare { inset-inline-end: 5%; bottom: -9%; width: 24%; }
.c-web-phone .frame--bare { width: 30%; bottom: -5%; inset-inline-end: 2%; }
.c-phones-3 .frame--phone { bottom: -14%; width: 27%; }
.c-phones-3 .frame--phone:nth-child(1) { inset-inline-start: 10%; bottom: -22%; width: 25%; }
.c-phones-3 .frame--phone:nth-child(2) { inset-inline-start: 37%; bottom: -6%; width: 27%; z-index: 2; }
.c-phones-3 .frame--phone:nth-child(3) { inset-inline-start: 66%; bottom: -22%; width: 25%; }
.c-phones-2 .frame--phone:nth-child(1) { inset-inline-start: 22%; bottom: -16%; width: 27%; }
.c-phones-2 .frame--phone:nth-child(2) { inset-inline-start: 51%; bottom: -8%; width: 27%; z-index: 2; }
.c-phone-1 .frame--phone { inset-inline-start: 50%; translate: -50% 0; bottom: -12%; width: 30%; }
html[dir="rtl"] .c-phone-1 .frame--phone { translate: 50% 0; }
.c-bare-1 .frame--bare { inset-inline-start: 50%; translate: -50% 0; bottom: -2%; width: 36%; }
html[dir="rtl"] .c-bare-1 .frame--bare { translate: 50% 0; }
.c-archive .frame--browser { inset-inline-start: 9%; top: 14%; width: 82%; }

/* hover: the composition lifts; devices separate a little */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .work-card .frame { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
  .work-card:hover .frame--browser { transform: translateY(-6px); }
  .work-card:hover .frame--phone, .work-card:hover .frame--bare { transform: translateY(-14px); }
  .work-card:hover .c-phones-3 .frame--phone:nth-child(2), .work-card:hover .c-phones-2 .frame--phone:nth-child(2) { transform: translateY(-22px); }
}

/* ---------- Work card (index) ---------- */
.work-grid { display: grid; gap: clamp(20px, 3vw, 36px); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.work-card { grid-column: span 2; display: grid; gap: 14px; text-decoration: none; color: inherit; }
.work-card--lg { grid-column: span 3; }
.work-card--sm { grid-column: span 2; }
.work-card:hover { color: inherit; }
.work-card:focus-visible { outline-offset: 6px; border-radius: var(--r-lg); }
.work-card__cap { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding-inline: 4px; align-items: start; }
.work-card__name { font: 700 var(--fs-h3)/1.3 var(--font-display); margin: 0; grid-column: 1; }
.work-card__kind { color: var(--ink-2); margin: 0; font-size: var(--fs-small); grid-column: 1; }
.work-card__tag { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin-top: 6px; display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-caption); color: var(--ink-3); white-space: nowrap; }
.work-card__tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 20%, #fff); }
.work-card:hover .work-card__name { color: var(--sky-ink); }
@media (max-width: 1024px) { .work-card, .work-card--lg, .work-card--sm { grid-column: span 3; } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } .work-card, .work-card--lg, .work-card--sm { grid-column: auto; } }

/* archive tier: smaller, quieter, the same system */
.archive-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.archive-grid .work-card { grid-column: auto; gap: 10px; }
.archive-grid .work-card__name { font-size: 1.0625rem; }
.archive-grid .stage { border-radius: var(--r-md); }
.archive-grid .frame--browser::before { height: 16px; background-size: 5px 5px, 5px 5px, 5px 5px, 40% 7px; background-position: 8px 5px, 17px 5px, 26px 5px, 50% 4px; }
html[dir="rtl"] .archive-grid .frame--browser::before { background-position: right 8px top 5px, right 17px top 5px, right 26px top 5px, 50% 4px; }
@media (max-width: 1024px) { .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .archive-grid { grid-template-columns: 1fr; } }

/* ---------- Logo wall ---------- */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.logo-wall li { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-md); min-height: 96px; display: grid; place-items: center; padding: 14px; }
.logo-wall img { max-height: 56px; width: auto; filter: grayscale(1) contrast(1.05); opacity: .72; transition: filter .25s, opacity .25s; }
.logo-wall li:hover img { filter: none; opacity: 1; }
.name-wall { columns: 3; column-gap: 32px; margin-top: 28px; color: var(--ink-2); font-size: var(--fs-small); }
.name-wall li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
@media (max-width: 800px) { .name-wall { columns: 2; } }
@media (max-width: 480px) { .name-wall { columns: 1; } }

/* ---------- Closing band + footer ---------- */
.band { background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 60vw; max-width: 760px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(75,162,217,.28), transparent 62%); pointer-events: none; }
.band__in { position: relative; display: grid; gap: 24px; grid-template-columns: 1.3fr 1fr; align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.band__h { font-size: var(--fs-h1); color: #fff; margin: 0 0 .35em; font-weight: 800; }
.band__p { color: var(--on-navy-2); font-size: var(--fs-lead); margin: 0; max-width: 48ch; }
.band__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.band__contact { display: grid; gap: 4px; margin-top: 18px; font-size: var(--fs-small); color: var(--on-navy-2); }
.band__contact a { color: #fff; text-decoration: none; font-weight: 500; }
.band__contact a:hover { color: var(--sky); }
@media (max-width: 860px) { .band__in { grid-template-columns: 1fr; } .band__actions { justify-content: flex-start; } }

.site-foot { background: var(--navy); color: var(--on-navy-2); border-top: 1px solid rgba(255,255,255,.08); font-size: var(--fs-small); }
.site-foot__grid { display: grid; gap: 32px; grid-template-columns: 1.6fr 1fr 1fr 1fr; padding-block: 48px 28px; }
.site-foot__about p { max-width: 38ch; margin: 0; }
.site-foot__h { font: 600 1rem/1.3 var(--font-display); color: #fff; margin: 0 0 12px; }
.site-foot a { color: var(--on-navy-2); text-decoration: none; display: inline-block; padding: 4px 0; }
.site-foot a:hover { color: #fff; }
.site-foot__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px 26px; border-top: 1px solid rgba(255,255,255,.08); font-size: var(--fs-caption); }
@media (max-width: 900px) { .site-foot__grid { grid-template-columns: 1fr 1fr; } .site-foot__about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-foot__grid { grid-template-columns: 1fr; } }

/* ---------- Home: hero ---------- */
.hero { background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: auto auto -30% 50%; translate: -50% 0; width: 140vw; max-width: 1800px; aspect-ratio: 2 / 1; border-radius: 50%; background: radial-gradient(ellipse at 50% 100%, rgba(75,162,217,.34), rgba(75,162,217,.08) 45%, transparent 70%); pointer-events: none; }
.hero__in { position: relative; display: grid; gap: clamp(32px, 4vw, 64px); align-items: center; padding-block: clamp(56px, 8vw, 110px) 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.hero__h { font-size: var(--fs-display); font-weight: 800; line-height: 1.18; color: #fff; margin: 0 0 .4em; max-width: 13ch; }
.hero__lead { font-size: var(--fs-lead); color: var(--on-navy-2); max-width: 46ch; margin: 0 0 1.6em; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); color: var(--on-navy-2); font-size: var(--fs-small); }
.hero__facts b { display: block; color: #fff; font: 700 1.5rem/1.2 var(--font-display); }
/* composed product showcase */
.showcase { position: relative; aspect-ratio: 5 / 4; align-self: end; }
.showcase .frame--browser { position: absolute; inset-inline-start: 0; top: 6%; width: 86%; border-radius: 12px; }
.showcase .frame--browser::before { height: 30px; }
.showcase .frame--phone { position: absolute; inset-inline-end: 0; bottom: -4%; width: 26%; z-index: 2; box-shadow: 0 40px 70px -24px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); }
.showcase .frame--phone .win { border-radius: 12% / 5%; }
.showcase__tag { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255,255,255,.96); color: var(--ink); font: 600 .85rem/1 var(--font-text); box-shadow: var(--sh-float-sm); }
.showcase__tag--a { inset-inline-start: -4%; top: 58%; }
.showcase__tag--b { inset-inline-end: 24%; top: 2%; }
.showcase__tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
@media (prefers-reduced-motion: no-preference) {
  .showcase .frame { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .showcase .frame--phone { animation-delay: .18s; }
  .showcase__tag { animation: rise .7s .45s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 960px) {
  .hero__in { grid-template-columns: 1fr; padding-bottom: 32px; }
  .showcase { width: min(100%, 560px); margin-inline: auto; }
  .hero__h { max-width: none; }
}

/* ---------- Home: products ---------- */
.prod-grid { display: grid; gap: clamp(18px, 2.5vw, 28px); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.prod { grid-column: span 2; display: grid; grid-template-rows: auto 1fr; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-card); overflow: hidden; text-decoration: none; color: inherit; }
.prod--lg { grid-column: span 3; }
.prod:hover { color: inherit; }
.prod__stage { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: linear-gradient(180deg, var(--p-tint), color-mix(in srgb, var(--p) 22%, #fff)); }
.prod--lg .prod__stage .frame--browser { inset-inline-start: 7%; top: 12%; width: 100%; border-radius: 10px 0 0 0; }
html[dir="rtl"] .prod--lg .prod__stage .frame--browser { border-radius: 0 10px 0 0; }
.prod__stage .frame--phone { inset-inline-start: 50%; translate: -50% 0; top: 12%; width: 34%; }
html[dir="rtl"] .prod__stage .frame--phone { translate: 50% 0; }
.prod__body { padding: 22px 24px 26px; display: grid; gap: 6px; align-content: start; }
.prod__name { font: 700 var(--fs-h3)/1.3 var(--font-display); margin: 0; }
.prod__role { color: var(--p-deep); font-weight: 500; font-size: var(--fs-small); margin: 0; }
.prod__lead { color: var(--ink-2); margin: 6px 0 0; font-size: var(--fs-small); }
.prod__more { margin-top: 10px; font-weight: 600; color: var(--sky-ink); font-size: var(--fs-small); display: inline-flex; gap: .4em; align-items: center; }
.prod__more svg { width: 1em; height: 1em; } html[dir="rtl"] .prod__more svg { transform: scaleX(-1); }
/* channels tile for EasyChat, type tile for clinics (no screenshots exist) */
.prod__chips { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; }
.prod__chips span { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r-pill); background: #fff; box-shadow: var(--sh-float-sm); font-weight: 600; font-size: .95rem; direction: ltr; }
.prod__chips span:nth-child(1) { translate: -24px 0; } .prod__chips span:nth-child(3) { translate: 24px 0; }
.prod__chips i { width: 10px; height: 10px; border-radius: 50%; background: var(--p); }
.prod__ui { position: absolute; inset: 12% 10% -4%; background: #fff; border-radius: 12px 12px 0 0; box-shadow: var(--sh-float); padding: 16px; display: grid; gap: 10px; align-content: start; font-size: .8rem; color: var(--ink-2); }
.prod__ui b { display: block; font: 600 .95rem/1.3 var(--font-display); color: var(--ink); }
.prod__ui span { display: block; height: 10px; border-radius: 6px; background: var(--paper-2); }
.prod__ui span:nth-child(3) { width: 70%; } .prod__ui span:nth-child(5) { width: 55%; }
.prod__ui em { font-style: normal; display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--p-tint); color: var(--p-deep); font-weight: 600; justify-self: start; }
@media (max-width: 1024px) { .prod, .prod--lg { grid-column: span 3; } }
@media (max-width: 640px) { .prod-grid { grid-template-columns: 1fr; } .prod, .prod--lg { grid-column: auto; } }

.taxgate { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: clamp(20px, 3vw, 32px); padding: 18px 22px; border-radius: var(--r-md); background: var(--white); box-shadow: var(--sh-card); }
.taxgate b { font: 700 1.05rem/1 var(--font-display); color: var(--ink); direction: ltr; }
.taxgate p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }
.taxgate .dots { --p: #128C56; }

/* ---------- Home: services ---------- */
.svc-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.svc { background: var(--white); border-radius: var(--r-md); padding: 26px 24px 24px; box-shadow: var(--sh-card); display: grid; gap: 8px; align-content: start; text-decoration: none; color: inherit; }
.svc:hover { color: inherit; box-shadow: var(--sh-float-sm); }
.svc__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--sky-tint); color: var(--sky-ink); display: grid; place-items: center; margin-bottom: 8px; }
.svc__icon svg { width: 22px; height: 22px; }
.svc__h { font: 700 1.2rem/1.3 var(--font-display); margin: 0; }
.svc p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }
.svc ul { margin-top: 6px; display: grid; gap: 4px; color: var(--ink-2); font-size: var(--fs-caption); }
.svc li { padding-inline-start: 16px; position: relative; }
.svc li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }
@media (max-width: 1024px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- Home: facts (no table) ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.fact { background: var(--white); border-radius: var(--r-md); padding: 24px 22px 22px; box-shadow: var(--sh-card); }
.fact b { display: block; font: 800 clamp(2rem, 1.5rem + 2vw, 3rem)/1.1 var(--font-display); color: var(--ink); margin-bottom: 6px; }
.fact b small { font-size: .5em; font-weight: 600; color: var(--ink-3); margin-inline-start: .2em; }
.fact span { color: var(--ink-2); font-size: var(--fs-small); }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Project (case study) ---------- */
.case-hero { padding-block: clamp(32px, 5vw, 64px) 0; }
.case-hero__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: clamp(24px, 3vw, 40px); }
.case-hero__h { font-size: var(--fs-display); font-weight: 800; line-height: 1.12; margin: 0 0 .25em; }
.case-hero__kind { font-size: var(--fs-lead); color: var(--ink-2); margin: 0; }
.case-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 28px; justify-content: end; font-size: var(--fs-small); color: var(--ink-3); }
.case-meta b { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .case-hero__head { grid-template-columns: 1fr; } .case-meta { justify-content: start; } }
.case-stage { aspect-ratio: auto; min-height: clamp(300px, 46vw, 620px); }
.case-stage .frame--browser { inset-inline-start: 5%; top: 9%; width: 74%; border-radius: 12px; }
.case-stage .frame--browser::before { height: 32px; }
.case-stage .frame--bare { inset-inline-end: 3%; bottom: -4%; width: 26%; }
.case-stage .frame--phone { inset-inline-end: 6%; bottom: -8%; width: 20%; }
.case-stage.c-phones-3 .frame--phone { width: 20%; }
.case-stage.c-phones-3 .frame--phone:nth-child(1) { inset-inline-start: 16%; bottom: -18%; }
.case-stage.c-phones-3 .frame--phone:nth-child(2) { inset-inline-start: 40%; bottom: -4%; z-index: 2; }
.case-stage.c-phones-3 .frame--phone:nth-child(3) { inset-inline-start: 64%; bottom: -18%; }
@media (max-width: 640px) {
  .case-stage { min-height: 0; aspect-ratio: 4 / 3; }
  .case-stage .frame--browser { width: 82%; inset-inline-start: 4%; }
  .case-stage .frame--bare { width: 34%; }
  .case-stage .frame--phone { width: 26%; }
}

.case-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-block: clamp(40px, 6vw, 80px) 0; }
.case-body h2 { font-size: var(--fs-h3); margin-bottom: .5em; }
.case-body .lead { font-size: var(--fs-lead); color: var(--ink); }
.quote { margin: 0; padding: 22px 24px; border-radius: var(--r-md); background: var(--white); box-shadow: var(--sh-card); border-inline-start: 4px solid var(--p); }
.quote p { margin: 0 0 8px; font-size: 1.0625rem; }
.quote cite { font-style: normal; color: var(--ink-3); font-size: var(--fs-caption); }
.case-facts { display: grid; gap: 14px; margin-top: 22px; font-size: var(--fs-small); color: var(--ink-2); }
.case-facts div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.case-facts b { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .case-body { grid-template-columns: 1fr; } }

/* screens sequence */
.screens { display: grid; gap: clamp(20px, 3vw, 36px); padding-block: clamp(40px, 6vw, 80px) 0; }
.screen { display: grid; gap: 14px; }
.screen__cap { color: var(--ink-2); font-size: var(--fs-small); margin: 0; max-width: 60ch; padding-inline: 4px; }
.screen--web .stage { aspect-ratio: 16 / 9; }
.screen--web .frame--browser { position: relative; width: min(92%, 1100px); margin: 6% auto -2%; border-radius: 12px; }
.screen--web .frame--browser::before { height: 30px; }
.screen--web .frame--browser .win { aspect-ratio: 16 / 9.4; }
.screen--web.screen--full .frame--browser .win { aspect-ratio: auto; max-height: none; }
.screen--web.screen--full .frame--browser img { height: auto; object-fit: initial; }
.screen--web.screen--full .stage { aspect-ratio: auto; }
.screen--web.screen--full .frame--browser { margin-bottom: 0; }
.screen--phones .stage { aspect-ratio: 16 / 9; }
.screen--phones .stage > div { position: absolute; inset: 10% 8% -12%; display: flex; gap: 4%; justify-content: center; align-items: flex-end; }
.screen--phones .frame--phone { position: relative; width: 22%; flex: none; }
.screen--phones .frame--phone:nth-child(even) { translate: 0 -8%; }
.screen--bare .stage { aspect-ratio: 16 / 9; }
.screen--bare .stage > div { position: absolute; inset: 6% 6% -2%; display: flex; gap: 2%; justify-content: center; align-items: flex-end; }
.screen--bare .frame--bare { position: relative; width: 30%; flex: none; }
.screen--bare .frame--bare.is-wide { width: 62%; }
.screen--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) {
  .screen--phones .stage, .screen--bare .stage { aspect-ratio: 4 / 3; }
  .screen--phones .frame--phone { width: 30%; }
  .screen--phones .frame--phone:nth-child(n+4) { display: none; }
  .screen--bare .frame--bare { width: 44%; }
  .screen--2 { grid-template-columns: 1fr; }
}

.case-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-block: clamp(40px, 6vw, 80px); }
.case-nav a { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: var(--r-md); background: var(--white); box-shadow: var(--sh-card); text-decoration: none; color: inherit; }
.case-nav a:hover { box-shadow: var(--sh-float-sm); }
.case-nav .stage { aspect-ratio: 1; border-radius: var(--r-sm); }
.case-nav small { display: block; color: var(--ink-3); font-size: var(--fs-caption); }
.case-nav b { font: 700 1.05rem/1.3 var(--font-display); }
.case-nav a:last-child { grid-template-columns: 1fr 84px; text-align: end; }
.case-nav a:last-child .stage { order: 2; }
@media (max-width: 560px) { .case-nav { grid-template-columns: 1fr; } .case-nav a:last-child { grid-template-columns: 84px 1fr; text-align: start; } .case-nav a:last-child .stage { order: 0; } }

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- additions after review 1 ---------- */
/* Logo mark: logo-mark.png = GT4 + cursor + three dots exported from logo-lg.png without the tagline
   (cursor filled white, as in the original). Footer uses logo-mark-white.png. */
.brand__mark { display: block; width: 118px; }
.brand__mark img { width: 100%; height: auto; }
.site-foot__about .brand__mark { width: 110px; margin-bottom: 14px; }
.site-foot__about .brand__mark img { opacity: .92; margin: 0; }
@media (max-width: 960px) { .brand__mark { width: 100px; } }
/* Cropped photographed phone screens: the img is scaled/offset into the window by inline style */
.frame--phone .win { position: relative; }
.frame--phone .win img.crop { position: absolute; left: 0; top: 0; height: auto; max-width: none; object-fit: initial; }
/* band contact links shrink-wrap so LTR numbers sit at the inline start */
.band__contact { justify-items: start; }

/* ---------- review 2: navy header on every page (hero, header and footer bookend the light body) ---------- */
.site-head { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--on-navy); }
.nav a { color: var(--on-navy-2); }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--sky); }
.lang { color: var(--on-navy-2); } .lang:hover { color: #fff; background: rgba(255,255,255,.08); }
.menu-btn { border-color: rgba(255,255,255,.22); color: var(--on-navy); }
.hero { border-top: 1px solid rgba(255,255,255,.06); }
.case-meta dt, .case-meta dd { margin: 0; } .case-meta div { display: grid; gap: 2px; }
.case-hero__kind { max-width: 40ch; }

/* ---------- review 3 ---------- */
.hero__h { font-size: clamp(2.125rem, 1.3rem + 2.9vw, 3.75rem); line-height: 1.32; max-width: none; }
html[dir="ltr"] .hero__h { line-height: 1.12; }
.brand__mark { width: 136px; }
@media (max-width: 960px) { .brand__mark { width: 108px; } }
ol.crumbs { list-style: none; padding: 0; margin: 0 0 18px; }
.hero { padding-bottom: 0; }
.hero__in { padding-bottom: 0; }
.showcase { margin-bottom: 0; }
.showcase .frame--phone { bottom: 0; }

/* ---------- review 4: phone bezel as a % margin of the frame (percent padding resolves against the stage, not the frame) ---------- */
.frame--phone { padding: 0; aspect-ratio: auto; height: auto; }
.frame--phone .win { width: 94%; height: auto; margin: 3%; aspect-ratio: 9 / 19.5; border-radius: 10% / 4.6%; }
.frame--phone::before { top: 1.6%; height: 2%; }
.showcase .frame--phone .win { border-radius: 10% / 4.6%; }

/* ---------- review 5: bare photos get no CSS shadow (a rectangular drop-shadow reveals the image box under multiply) ---------- */
.frame--bare { filter: none; }

/* =====================================================================
   Implementation additions — pages the mockups do not cover, built from the same tokens
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* contact-form honeypot: hidden from people, visible to bots */
.hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Mobile menu: the <details> below 960px, styled as the «القائمة» button ---------- */
.menu { display: none; }
@media (max-width: 960px) {
  .menu { display: block; }
  .menu__btn { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-sm); color: var(--on-navy); cursor: pointer; font-weight: 500; font-size: .95rem; }
  .menu__btn::-webkit-details-marker { display: none; }
  .menu__icon, .menu__icon::before, .menu__icon::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .18s; }
  .menu__icon::before, .menu__icon::after { content: ""; position: absolute; inset-inline-start: 0; }
  .menu__icon::before { top: -6px; } .menu__icon::after { top: 6px; }
  .menu[open] .menu__icon { background: transparent; }
  .menu[open] .menu__icon::before { top: 0; transform: rotate(45deg); }
  .menu[open] .menu__icon::after { top: 0; transform: rotate(-45deg); }
  .menu__nav { position: absolute; inset-inline: 0; top: 100%; background: var(--navy); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.12); padding: 8px var(--gutter) 18px; box-shadow: 0 24px 40px -20px rgba(0,0,0,.5); }
  .menu__nav ul { display: grid; }
  .menu__nav a { display: block; padding: 13px 4px; color: var(--on-navy); text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.08); }
  .menu__nav a:hover { color: #fff; }
  .menu__nav a[aria-current="page"] { color: #fff; box-shadow: inset 3px 0 0 var(--sky); padding-inline-start: 14px; }
  html[dir="rtl"] .menu__nav a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--sky); }
  .menu__nav .lang-m { color: var(--on-navy-2); border-bottom: 0; }
}

/* ---------- Inline section links / lists ---------- */
.dot-list { display: grid; gap: 10px; }
.dot-list li { position: relative; padding-inline-start: 22px; color: var(--ink-2); }
.dot-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--p, var(--sky)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p, var(--sky)) 18%, #fff); }
.dot-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
@media (max-width: 640px) { .dot-list--2 { grid-template-columns: 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.note { color: var(--ink-3); font-size: var(--fs-small); }

/* ---------- Products overview: same .prod card, with points and two CTAs ---------- */
.prod-grid--full .prod { grid-template-rows: auto 1fr; }
.prod-grid--full .prod__name a { color: inherit; text-decoration: none; }
.prod-grid--full .prod__name a:hover { color: var(--sky-ink); }
.prod-grid--full .prod__name a::after { content: ""; position: absolute; inset: 0; } /* whole stage+title clickable */
.prod-grid--full .prod { position: relative; }
.prod__points { margin: 12px 0 4px; gap: 8px; font-size: var(--fs-small); }
.prod__actions { margin-top: 14px; position: relative; z-index: 1; }
.prod__actions .btn { min-height: 44px; }
a.prod:hover .prod__name { color: var(--sky-ink); }

/* ---------- Product page ---------- */
.case-stage.c-web .frame--browser { inset-inline-start: 13%; width: 74%; top: 9%; }
.case-stage .prod__chips span { font-size: clamp(.95rem, .8rem + .6vw, 1.25rem); padding: 14px 22px; }
.case-stage .prod__chips span:nth-child(1) { translate: -48px 0; } .case-stage .prod__chips span:nth-child(3) { translate: 48px 0; }
.case-stage .prod__ui { inset: 14% 22% -4%; padding: clamp(18px, 3vw, 36px); gap: 16px; font-size: .95rem; }
.case-stage .prod__ui b { font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem); }
.case-stage .prod__ui span { height: 14px; }
.prod-body { padding-block: clamp(40px, 6vw, 80px) 0; }
.prod-body > * { max-width: 920px; }
.prod-body h2 { font-size: var(--fs-h3); margin-bottom: .5em; }
.prod-body .lead { font-size: var(--fs-lead); color: var(--ink); max-width: 60ch; }
.prod-body .dot-list { margin-block: 22px 30px; }
.prod-body .note { margin: 18px 0 0; }
.sec-end { height: clamp(40px, 6vw, 80px); }
.screens__h { font-size: var(--fs-h2); margin: 0; }
.screens__sub { color: var(--ink-2); margin: -8px 0 0; }
@media (max-width: 640px) {
  .case-stage .prod__chips span:nth-child(1) { translate: -20px 0; } .case-stage .prod__chips span:nth-child(3) { translate: 20px 0; }
  .case-stage .prod__ui { inset: 12% 10% -4%; }
}

/* ---------- Case stage: compositions not in the mockups ---------- */
.case-stage.c-phones-2 .frame--phone { width: 20%; inset-inline-end: auto; }
.case-stage.c-phones-2 .frame--phone:nth-child(1) { inset-inline-start: 28%; bottom: -14%; }
.case-stage.c-phones-2 .frame--phone:nth-child(2) { inset-inline-start: 52%; bottom: -4%; z-index: 2; }
.case-stage.c-phones-3 .frame--phone, .case-stage.c-phones-2 .frame--phone { inset-inline-end: auto; }
/* archive projects: one 2013-era capture, never shown large — a smaller stage, header crop only */
.case-stage--archive { min-height: 0; aspect-ratio: 16 / 7; }
.case-stage--archive .frame--browser { inset-inline-start: 22%; width: 56%; top: 12%; }
@media (max-width: 640px) {
  .case-stage.c-phones-2 .frame--phone, .case-stage.c-phones-3 .frame--phone { width: 26%; }
  .case-stage.c-phones-3 .frame--phone:nth-child(1) { inset-inline-start: 8%; }
  .case-stage.c-phones-3 .frame--phone:nth-child(2) { inset-inline-start: 37%; }
  .case-stage.c-phones-3 .frame--phone:nth-child(3) { inset-inline-start: 66%; }
  .case-stage.c-phones-2 .frame--phone:nth-child(1) { inset-inline-start: 22%; }
  .case-stage.c-phones-2 .frame--phone:nth-child(2) { inset-inline-start: 52%; }
  .case-stage--archive { aspect-ratio: 4 / 3; }
  .case-stage--archive .frame--browser { inset-inline-start: 9%; width: 82%; }
}
.case-nav .c-phone-1 .frame--phone { width: 44%; bottom: -30%; }
.case-hero__kind { max-width: 46ch; }

/* ---------- Services ---------- */
.svc-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 72px); padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.svc-sec:first-child { border-top: 0; }
.svc-sec__h { font-size: var(--fs-h2); display: flex; align-items: center; gap: 14px; }
.svc-sec__h .svc__icon { margin: 0; flex: none; }
.svc-sec__body { color: var(--ink-2); }
.svc-sec .dot-list { margin-top: 18px; }
.svc-sec__proof { display: grid; gap: 14px; align-content: start; }
.svc-sec__proof .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.svc-sec__proof .work-card { grid-column: auto; gap: 10px; }
.svc-sec__proof .work-card__name { font-size: 1.0625rem; }
.svc-sec__proof .work-card__tag { display: none; }
.svc-sec__proof .stage { border-radius: var(--r-md); }
.svc-sec__label { font: 600 var(--fs-small)/1.4 var(--font-text); color: var(--ink-3); margin: 0; }
.svc-fact { background: var(--white); border-radius: var(--r-md); box-shadow: var(--sh-card); padding: 24px; display: grid; gap: 12px; align-content: start; border-inline-start: 4px solid var(--sky); }
.svc-fact p { margin: 0; color: var(--ink-2); }
.svc-fact ul { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-fact li { padding: 6px 12px; border-radius: var(--r-pill); background: var(--sky-tint); color: var(--sky-ink); font-size: var(--fs-caption); font-weight: 600; direction: ltr; }
.svc-grid--index .svc { scroll-margin-top: 80px; }
@media (max-width: 900px) { .svc-sec { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .svc-sec__proof .work-grid { grid-template-columns: 1fr 1fr; } .svc-sec__proof .work-card:nth-child(3) { display: none; } }

/* ---------- About ---------- */
.prose { max-width: 60ch; }
.prose p { color: var(--ink-2); }
.prose .lead { font-size: var(--fs-lead); color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step { background: var(--white); border-radius: var(--r-md); box-shadow: var(--sh-card); padding: 24px 22px; counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sky-tint); color: var(--sky-ink); font: 700 1rem/1 var(--font-display); margin-bottom: 14px; }
.step h3 { font-size: 1.15rem; margin-bottom: .35em; }
.step p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.facts { margin-top: clamp(28px, 4vw, 48px); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: clamp(22px, 3vw, 36px); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--fs-small); }
.field .hint { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); color: var(--ink); font: 400 1rem/1.5 var(--font-text); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--sky-ink); border-radius: var(--r-sm); }
.field input[type="tel"], .field input[type="email"] { direction: ltr; text-align: end; }
html[dir="ltr"] .field input[type="tel"], html[dir="ltr"] .field input[type="email"] { text-align: start; }
.field--error input, .field--error select, .field--error textarea { border-color: #B3261E; }
.err { color: #B3261E; font-size: var(--fs-small); margin: 0; }
.form-msg { margin: 0 0 18px; padding-inline-start: 14px; border-inline-start: 3px solid; font-size: var(--fs-small); }
.form-msg--ok { border-color: var(--wa); color: var(--wa-2); }
.form-msg--bad { border-color: #B3261E; color: #8C1D18; }
.contact-card { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: clamp(22px, 3vw, 32px); display: grid; gap: 18px; }
.contact-card h2 { font-size: var(--fs-h3); margin: 0; }
.contact-card .btn { justify-self: start; }
.contact-card dl { margin: 0; display: grid; gap: 14px; }
.contact-card dt { color: var(--ink-3); font-size: var(--fs-caption); }
.contact-card dd { margin: 0; font: 600 1.125rem/1.4 var(--font-display); }
.contact-card dd a { color: var(--ink); text-decoration: none; }
.contact-card dd a:hover { color: var(--sky-ink); }
.contact-card .note { margin: 0; padding-top: 16px; border-top: 1px solid var(--line-2); }

/* ---------- 404 (navy page) ---------- */
.nf { background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; padding-block: clamp(64px, 12vw, 160px); }
.nf::before { content: ""; position: absolute; inset: -40% auto auto -10%; width: 60vw; max-width: 760px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(75,162,217,.24), transparent 62%); pointer-events: none; }
.nf .wrap { position: relative; }
.nf .nf__code { font: 800 var(--fs-display)/1 var(--font-display); font-size: clamp(4.5rem, 3rem + 8vw, 9rem); color: #fff; direction: ltr; display: inline-flex; align-items: center; gap: .25em; margin: 0 0 .2em; }
.nf__code .dots { font-size: .28em; }
.nf h1 { color: #fff; font-size: var(--fs-h1); font-weight: 800; }
.nf p:not(.nf__code) { color: var(--on-navy-2); font-size: var(--fs-lead); max-width: 46ch; }
.nf .actions { margin-top: 28px; }
.case-body aside > .case-facts:first-child { margin-top: 0; }
.sec--flush { padding-top: 0; }
.steps { list-style: none; padding: 0; margin: 0; }
/* bare laptop/tablet photos have wide white margins of their own: give them more of the stage */
.screen--bare .frame--bare { width: 44%; }
.screen--bare .frame--bare.is-wide { width: 86%; }
.screen--bare .stage > div { align-items: center; inset: 4% 4% 4%; }
@media (max-width: 760px) { .screen--bare .frame--bare { width: 64%; } .screen--bare .frame--bare.is-wide { width: 96%; } }
.case-stage .prod__ui, .case-stage .prod__chips { z-index: 1; }
@media (max-width: 640px) { .prod--lg .prod__stage .frame--browser { width: 93%; } }

/* ---------- Home v3: benchmark pass (trust line, two paths, numbers, why) ---------- */
.hero__h { max-width: 19ch; font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.75rem); }
.hero__trust { display: flex; gap: 10px; align-items: center; margin: 36px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: var(--on-navy-2); font-size: var(--fs-small); max-width: 46ch; }
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.path { display: grid; gap: 10px; align-content: start; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--sh-card); color: inherit; text-decoration: none; border-inline-start: 4px solid var(--sky); }
.path:nth-child(2) { border-inline-start-color: var(--navy-3); }
.path:hover { color: inherit; box-shadow: var(--sh-float-sm); }
.path__h { font: 700 var(--fs-h3)/1.35 var(--font-display); margin: 0; color: var(--ink); }
.path p { margin: 0; color: var(--ink-2); }
.path__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--sky-ink); font-weight: 600; }
.path__more svg { width: 18px; height: 18px; }
[dir="rtl"] .path__more svg { transform: scaleX(-1); }
.path:hover .path__h { color: var(--sky-ink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.stat { padding: 26px 22px 6px; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat dt { color: var(--ink); font-weight: 600; line-height: 1.5; }
.stat dt b { display: block; font: 800 clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem)/1.1 var(--font-display); color: var(--sky-ink); margin-bottom: 8px; }
.stat dd { margin: 10px 0 0; color: var(--ink-3); font-size: var(--fs-small); }
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.why li { padding-top: 18px; border-top: 3px solid var(--sky); }
.why b { display: block; font: 700 1.125rem/1.4 var(--font-display); color: var(--ink); margin-bottom: 8px; }
.why p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }
.case-hero__sub { margin: 8px 0 0; color: var(--ink-3); font-size: var(--fs-small); max-width: 52ch; }
@media (max-width: 1024px) {
  .stats, .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
}
@media (max-width: 640px) {
  .paths, .stats, .why { grid-template-columns: 1fr; }
  .stat { border-inline-start: 0; padding-inline-start: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
}

/* ---------- Motion (Hazem 2026-11-15). Only when the visitor allows motion and JS is on (html.motion). ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* hero: one orchestrated entrance, then the devices keep breathing */
  .motion .hero__h, .motion .hero__lead, .motion .hero__actions, .motion .hero__trust { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .motion .hero__lead { animation-delay: .12s; }
  .motion .hero__actions { animation-delay: .24s; }
  .motion .hero__trust { animation-delay: .36s; }
  .motion .showcase .frame--phone { animation: rise .9s .18s cubic-bezier(.2, .7, .2, 1) both, float 6s 1.2s ease-in-out infinite; }
  .motion .showcase__tag--a { animation: rise .7s .45s cubic-bezier(.2, .7, .2, 1) both, float 7s 1.4s ease-in-out infinite; }
  .motion .showcase__tag--b { animation: rise .7s .55s cubic-bezier(.2, .7, .2, 1) both, float 8s 2s ease-in-out infinite; }
  .motion .hero::before { animation: glow 9s ease-in-out infinite alternate; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  @keyframes glow { from { opacity: .75; scale: 1; } to { opacity: 1; scale: 1.08; } }

  /* scroll reveal: items arrive once, staggered inside their group */
  .motion .rv { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
  .motion .rv.in { opacity: 1; transform: none; }

  /* devices on a stage slide in from the floor when their card appears */
  .motion .rv .stage .frame--phone, .motion .rv .prod__stage .frame--phone { transition: transform .9s .25s cubic-bezier(.2, .7, .2, 1); }
  .motion .rv:not(.in) .stage .frame--phone { transform: translateY(40px); }

  /* EasyChat channel chips pop in one after another */
  .motion .prod__chips span { transition: opacity .5s, transform .5s cubic-bezier(.3, 1.4, .5, 1); }
  .motion .prod__chips span:nth-child(2) { transition-delay: .15s; }
  .motion .prod__chips span:nth-child(3) { transition-delay: .3s; }
  .motion .rv:not(.in) .prod__chips span { opacity: 0; transform: scale(.8) translateY(10px); }

  /* case page: the stage rises on load */
  .motion .case-stage .frame { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .motion .case-stage .frame:nth-child(2) { animation-delay: .15s; }
  .motion .case-stage .frame:nth-child(3) { animation-delay: .3s; }
  .motion .case-stage .frame:nth-child(4) { animation-delay: .45s; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .prod, .path, .svc, .why li { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
  .prod:hover, .path:hover, .svc:hover { transform: translateY(-6px); box-shadow: var(--sh-float-sm); }
  .prod__stage .frame { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
  .prod:hover .prod__stage .frame--browser { transform: translateY(-8px); }
  .prod:hover .prod__stage .frame--phone { transform: translateY(-14px); }
  .path__more svg, .sec__more svg, .prod__more svg { transition: translate .25s; }
  .path:hover .path__more svg, .sec__more:hover svg, .prod:hover .prod__more svg { translate: 5px 0; }
  html[dir="rtl"] .path:hover .path__more svg, html[dir="rtl"] .sec__more:hover svg, html[dir="rtl"] .prod:hover .prod__more svg { translate: -5px 0; }
}
