/* ============================================================
   CODA — design v2 (trial)
   Warm editorial: dark espresso + cream, serif display type,
   floating pill nav, horizontal cards, scroll-driven reveals.
   ============================================================ */
:root {
  /* palette — CODA brand colours (same values as the main site's styles.css) */
  --ink:        #0c100e;   /* CODA dark */
  --dark:       #0f1411;   /* section dark */
  --dark-2:     #1a211d;   /* cards on dark */
  --line-dark:  rgba(232, 237, 233, .09);
  --cream:      #f6f7f4;   /* light sections */
  --cream-2:    #eef1ec;   /* inner boxes on light */
  --line-cream: rgba(12, 16, 14, .1);
  --text-dark:  #0c100e;
  --muted-dark: #5f6a63;   /* muted on light */
  --text-light: #e8ede9;
  --muted-light:#a6b0a9;   /* muted on dark */
  --accent:     #3b82f6;   /* CODA Cyber Blue */
  --accent-strong: #2563eb; /* blue for text on light backgrounds (contrast) */

  /* type */
  --f-display: 'Amiri', 'Cormorant Garamond', serif;
  --f-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 22px;
  --wrap: min(1180px, 100% - 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-light);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.mono { font-family: var(--f-mono); letter-spacing: .18em; font-size: .7rem; text-transform: uppercase; direction: ltr; unicode-bidi: isolate; }
.wrap { width: var(--wrap); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ============ INTRO ============ */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 1.4rem;
  background: #000; color: var(--text-light);
  transition: opacity .6s var(--ease), visibility .6s;
}
.intro__mark { width: 92px; height: 92px; }
.intro__arc { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s .15s var(--ease) forwards; }
.intro__dot { fill: var(--accent); transform-origin: 29px 18px; transform: scale(0); animation: pop .45s .95s var(--ease) forwards; }
.intro__tag { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .4em; color: var(--muted-light); opacity: 0; animation: fade .5s 1.1s forwards; direction: ltr; }
.intro.is-done { opacity: 0; visibility: hidden; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 60% { transform: scale(1.25); } to { transform: scale(1); } }
@keyframes fade { to { opacity: 1; } }

/* ============ NAV (floating pill) ============ */
.nav {
  position: fixed; z-index: 50;
  top: max(12px, env(safe-area-inset-top)); inset-inline: 12px;
  max-width: 1180px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem .7rem .55rem 1.1rem;
  background: rgba(232,237,233, .92);
  color: var(--text-dark);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.45);
  transition: transform .5s var(--ease), box-shadow .3s;
}
.nav.is-hidden { transform: translateY(-140%); }
.nav__brand { display: flex; align-items: center; gap: .5rem; font-weight: 600; letter-spacing: .12em; font-size: .95rem; direction: ltr; }
.nav__brand svg { width: 26px; height: 26px; }
.nav__brand .dot, .foot__brand .dot { fill: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: .35rem; }
.nav__lang { display: flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 500; padding: .35rem .6rem; border-radius: 999px; }
.nav__lang svg { width: 16px; height: 16px; }
.nav__lang:hover { background: rgba(12,16,14,.06); }
.nav__menu {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--text-dark);
  display: grid; place-content: center; gap: 4px;
}
.nav__menu span { display: block; width: 16px; height: 1.5px; background: var(--cream); transition: transform .3s var(--ease), opacity .2s; }
.nav__menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem max(24px, calc((100% - 1180px) / 2));
  opacity: 0; transition: opacity .4s var(--ease);
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu ol { list-style: none; margin: 0; padding: 0; }
.menu li { border-bottom: 1px solid var(--line-dark); }
.menu li a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1rem 0; font-family: var(--f-display); font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1.2;
  transition: color .2s, padding .3s var(--ease);
}
.menu li a:hover { color: var(--accent); padding-inline-start: .6rem; }
.menu li i { font-style: normal; font-family: var(--f-mono); font-size: .75rem; color: var(--accent); letter-spacing: .15em; }
.menu__wa { margin-top: 2rem; align-self: flex-start; color: var(--muted-light); border-bottom: 1px solid currentColor; }

/* ============ BUTTONS & SMALL BITS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: .95rem; line-height: 1;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--light { background: var(--cream); color: var(--text-dark); }
.btn--ghost-light { border-color: rgba(232,237,233,.35); color: var(--text-light); }
.btn--ghost-light:hover { border-color: var(--cream); }
.btn--dark { background: var(--text-dark); color: var(--cream); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--block { width: 100%; }

.eyebrow {
  display: flex; align-items: center; gap: .8rem;
  margin: 0 0 1.2rem; font-size: .85rem; font-weight: 500; color: var(--accent);
}
.eyebrow .rule { width: 46px; height: 1px; background: var(--accent); }
.eyebrow--center { justify-content: center; }
.eyebrow--light { color: rgba(232,237,233,.7); }

.display {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.4rem, 7.5vw, 4.8rem); line-height: 1.15;
  margin: 0 0 1.4rem; letter-spacing: -.005em;
}
.display--center { text-align: center; }
.lead { max-width: 560px; color: var(--muted-light); margin: 0 0 2rem; font-size: 1.02rem; }
.sec--cream .lead { color: var(--muted-dark); }
.lead--center { text-align: center; margin-inline: auto; }

.link-arrow { display: inline-flex; gap: .5rem; font-weight: 500; padding-bottom: .35rem; border-bottom: 1px solid currentColor; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translate(-3px, -3px); }

.chip-sm { font-size: .72rem; padding: .25rem .7rem; border-radius: 999px; background: rgba(12,16,14,.07); color: var(--muted-dark); }
.chip-sm--accent { background: var(--accent); color: #fff; }

/* ============ SECTIONS ============ */
.sec { padding: clamp(5rem, 12vw, 8.5rem) 0; position: relative; }
.sec--tight { padding-top: clamp(3.5rem, 8vw, 6rem); }
.sec--cream { background: var(--cream); color: var(--text-dark); }
.sec--dark {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(59,130,246,.06), transparent 60%),
    var(--dark);
}

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  padding: 0 0 clamp(3rem, 8vh, 5.5rem); overflow: hidden; background: var(--ink);
}
/* Hero backdrop = aurora + live code (options 1 + 2 from hero-options.html).
   Two slow blue light fields turn behind faint lines of code that scroll
   upward; the code fades out at the top and behind the headline. */
.hero__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }   /* own stacking context: its fade never covers the content */
.hero__bg::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(180deg, transparent, var(--ink) 92%); z-index: 2; }
.aurora { position: absolute; border-radius: 50%; will-change: transform; }
.aurora--a {
  width: 170vmax; height: 120vmax; left: 50%; top: -55vmax; margin-left: -85vmax;
  background: conic-gradient(from 200deg at 50% 50%, transparent 0deg, rgba(59,130,246,.5) 60deg, rgba(96,165,250,.3) 110deg, transparent 160deg, rgba(37,99,235,.42) 240deg, transparent 300deg);
  filter: blur(60px); opacity: .85;
  animation: auroraSpin 26s linear infinite;
}
.aurora--b {
  width: 90vmax; height: 60vmax; top: 10%; inset-inline-start: -20vmax;
  background: radial-gradient(ellipse at center, rgba(52,211,153,.14), transparent 60%);
  filter: blur(60px); animation: auroraFloat 14s ease-in-out infinite alternate;
}
@keyframes auroraSpin { to { transform: rotate(360deg); } }
@keyframes auroraFloat { to { transform: translate(12vmax, 6vmax) scale(1.15); } }
.code-rain {
  position: absolute; inset: 0; z-index: 1;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 48%, transparent 78%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 48%, transparent 78%);
}
.code-rain pre {
  margin: 0; padding: 0 max(20px, calc((100% - 1180px) / 2));
  direction: ltr; text-align: left;
  font: 400 clamp(.62rem, 1.6vw, .82rem)/1.8 var(--f-mono); color: rgba(232,237,233,.16);
  white-space: pre; animation: codeScroll 60s linear infinite;
}
.code-rain b { color: rgba(96,165,250,.6); font-weight: 400; }
.code-rain i { color: rgba(52,211,153,.45); font-style: normal; }
@keyframes codeScroll { to { transform: translateY(-50%); } }
/* Wide screens: keep the code on the side opposite the headline */
@media (min-width: 900px) {
  .code-rain { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 88%), linear-gradient(90deg, #000 0%, #000 45%, transparent 70%); -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 88%), linear-gradient(90deg, #000 0%, #000 45%, transparent 70%); mask-composite: intersect; }
  [dir="ltr"] .code-rain pre { text-align: right; }
  [dir="ltr"] .code-rain { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 88%), linear-gradient(270deg, #000 0%, #000 45%, transparent 70%); mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 88%), linear-gradient(270deg, #000 0%, #000 45%, transparent 70%); }
}
.hero__content { position: relative; z-index: 1; width: var(--wrap); margin-inline: auto; }
.hero__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.9rem, 11vw, 6.6rem); line-height: 1.15; margin: 0 0 1.4rem; }
/* Each line is masked for the slide-up reveal. Amiri has deep descenders (ع ق ي), so the mask gets extra room at the bottom and pulls the next line back up. */
.hero__title .line { display: block; overflow: hidden; padding: .06em 0 .38em; margin-bottom: -.3em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.hero__title .line:nth-child(2) > span { transition-delay: .12s; }
.hero__title em { font-style: normal; color: var(--accent); }
.is-ready .hero__title .line > span { transform: none; }
.hero__sub { max-width: 460px; color: rgba(232,237,233,.75); margin: 0 0 2rem; font-size: 1.05rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero__sub, .hero__cta, .hero .eyebrow { opacity: 0; transform: translateY(14px); transition: opacity .9s .45s var(--ease), transform .9s .45s var(--ease); }
.is-ready .hero__sub, .is-ready .hero__cta, .is-ready .hero .eyebrow { opacity: 1; transform: none; }
.hero__scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 22px; height: 36px; border: 1.5px solid rgba(232,237,233,.35); border-radius: 12px; }
.hero__scroll span { position: absolute; top: 7px; left: 50%; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cream); animation: scrollHint 1.8s infinite; }
@keyframes scrollHint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ============ ABOUT ============ */
.about__body { border-inline-start: 1px solid var(--line-cream); padding-inline-start: 1.4rem; max-width: 620px; margin-inline-start: auto; }
.about__body p { margin: 0 0 1.6rem; color: #3a403c; font-size: 1.05rem; }

/* ============ HORIZONTAL CARDS ============ */
.group { margin-top: 3.2rem; }
.group + .group { padding-top: 3.2rem; position: relative; }
.group + .group::before { content: ''; position: absolute; top: 0; inset-inline: 0; width: var(--wrap); margin-inline: auto; height: 1px; background: var(--line-dark); }
.group__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin: 0 auto 1.4rem; }
.hscroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 320px); gap: 14px;
  /* "proximity" lets the swipe glide with its own momentum and only settles
     on a card when it stops near one — "mandatory" felt jumpy. */
  overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px max(20px, calc((100% - 1180px) / 2)) 14px;
  scroll-padding-inline: max(20px, calc((100% - 1180px) / 2));
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
/* mouse drag-to-scroll (js adds .is-draggable on fine pointers) */
.hscroll.is-draggable { cursor: grab; }
.hscroll.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.hscroll.is-dragging * { pointer-events: none; }
.scard {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), var(--dark-2);
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.7rem; min-height: 250px;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .4s var(--ease);
}
.scard:hover { border-color: rgba(59,130,246,.45); transform: translateY(-4px); }
.scard__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--line-dark); margin-bottom: auto; }
.scard__icon svg { width: 22px; height: 22px; color: var(--text-light); }
.scard__num { color: var(--muted-light); margin: 2.4rem 0 .4rem; font-size: .65rem; }
.scard h4 { margin: 0 0 .4rem; font-size: 1.1rem; font-weight: 500; }
.scard p { margin: 0; color: var(--muted-light); font-size: .9rem; line-height: 1.7; }

/* ============ PROJECT GRID ============ */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: 1.8rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line-cream); }
.chips button { border: 1px solid var(--line-cream); background: transparent; color: var(--text-dark); padding: .55rem 1.15rem; border-radius: 999px; font-size: .88rem; transition: background .2s, color .2s; }
.chips button[aria-selected="true"] { background: var(--text-dark); color: var(--cream); border-color: var(--text-dark); }
/* flex + centered so an odd last card sits in the middle instead of one side */
.pgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.pgrid > * { flex: 0 1 100%; min-width: 0; }
@media (min-width: 700px) { .pgrid > * { flex-basis: calc((100% - 18px) / 2); } }
@media (min-width: 1060px) { .pgrid > * { flex-basis: calc((100% - 36px) / 3); } }
.pcard-p {
  background: #ffffff; border: 1px solid var(--line-cream); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  animation: cardIn .6s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } }
/* Client logo tile. Its background is picked per logo by v2.js:
   light tile (default) · dark tile for logos with white/light artwork ·
   the logo's own colour when the image has a solid background. */
.pcard-p__img {
  position: relative; height: 150px; overflow: hidden;
  background: #ffffff; border-bottom: 1px solid var(--line-cream);
  transition: background .4s;
}
@media (min-width: 700px) { .pcard-p__img { height: 172px; } }
.pcard-p__img.is-dark { background: var(--ink); border-bottom-color: var(--ink); }
.pcard-p__logo { display: grid; place-items: center; height: 100%; padding: 2.4rem 1.6rem 1.1rem; }
.pcard-p__logo img {
  max-height: 64px; max-width: 66%; width: auto; height: auto; object-fit: contain;
  transition: transform .6s var(--ease);
}
.pcard-p:hover .pcard-p__logo img { transform: scale(1.06); }
.pcard-p__logo .mono-mark { font-family: var(--f-mono); font-weight: 500; font-size: 1.7rem; letter-spacing: .14em; color: var(--text-dark); direction: ltr; }
.pcard-p__img .badge { position: absolute; top: 12px; font-size: .7rem; padding: .28rem .7rem; border-radius: 999px; }
.badge--status { inset-inline-start: 12px; background: var(--accent); color: #fff; }
.badge--type { inset-inline-end: 12px; background: var(--cream-2); color: var(--muted-dark); }
.pcard-p__img.is-dark .badge--type { background: rgba(232,237,233,.12); color: var(--text-light); }
.pcard-p__body { padding: 1.3rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.pcard-p__body h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.pcard-p__body p { margin: 0; color: #3a403c; font-size: .9rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-p__facts { display: grid; grid-template-columns: 1fr; margin: auto 0 0; }
.pcard-p__facts div { background: var(--cream-2); border-radius: 10px; padding: .55rem .75rem; }
.pcard-p__facts dt { font-size: .68rem; color: var(--muted-dark); }
.pcard-p__facts dd { margin: 0; font-size: .82rem; font-weight: 500; line-height: 1.45; }

/* ============ MANIFESTO ============ */
.manifesto { background: #000; padding: clamp(5rem, 14vw, 9rem) 0; }
.manifesto__text {
  width: min(900px, 100% - 40px); margin: 0 auto;
  font-size: clamp(1.45rem, 4.4vw, 2.6rem); line-height: 1.65; font-weight: 500;
}
.manifesto__text .w { color: rgba(232,237,233,.16); transition: color .35s; }
.manifesto__text .w.is-on { color: var(--text-light); }
.manifesto__text .w.is-accent.is-on { color: var(--accent); }

/* ============ PRICING ============ */
/* Pricing slider: cards in a row, the active one centred, neighbours
   peeking at the edges. v2.js moves .ptrack with a transform and lets it
   follow the finger/mouse while dragging. */
.pstage {
  --card: min(70vw, 340px);
  --gap: 14px;
  margin-top: 1rem; padding: 1.2rem 0 1.6rem;
  overflow: hidden;
}
@media (min-width: 900px) { .pstage { --card: 360px; --gap: 26px; } }
.ptrack {
  position: relative; display: flex; gap: var(--gap); align-items: stretch;
  transition: transform .55s cubic-bezier(.22,.8,.24,1);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: grab; will-change: transform;
}
.ptrack.is-dragging { transition: none; cursor: grabbing; }
.ptrack .pcard {
  flex: 0 0 var(--card);
  transition: transform .55s cubic-bezier(.22,.8,.24,1), opacity .55s, box-shadow .55s;
  transform: scale(.92); opacity: .5;
}
.ptrack .pcard.is-active { transform: none; opacity: 1; box-shadow: 0 26px 50px -28px rgba(12,16,14,.4); }
.ptrack .pcard:not(.is-active) { cursor: pointer; }
.ptrack .pcard:not(.is-active) * { pointer-events: none; }
.ptrack a, .ptrack img { -webkit-user-drag: none; }
.pnav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .2rem; }
.pnav__btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-cream); background: #fff; color: var(--text-dark); font-size: 1rem; display: grid; place-items: center; transition: background .2s, color .2s, opacity .2s; }
.pnav__btn:hover { background: var(--text-dark); color: var(--cream); }
.pnav__btn:disabled { opacity: .3; pointer-events: none; }
.pdots { display: flex; justify-content: center; gap: .5rem; }
.pdots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: var(--line-cream); transition: width .35s var(--ease), background .35s; }
.pdots button[aria-selected="true"] { width: 26px; background: var(--text-dark); }
.pcard {
  background: #ffffff; border: 1px solid var(--line-cream); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; color: var(--text-dark);
}
.pcard--feat { background: var(--text-dark); color: var(--cream); border-color: var(--text-dark); }
.pcard--feat .chip-sm:not(.chip-sm--accent) { background: rgba(232,237,233,.1); color: var(--muted-light); }
.pcard__top { display: flex; justify-content: space-between; align-items: center; color: var(--muted-dark); }
.pcard--feat .pcard__top { color: var(--muted-light); }
.pcard h4 { font-family: var(--f-display); font-weight: 400; font-size: 2rem; margin: .8rem 0 0; line-height: 1.2; }
.pcard__price { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--accent); min-height: 1.75em; }
.pcard__price:empty::before { content: 'سعر حسب المشروع'; color: var(--muted-dark); font-weight: 400; font-size: .9rem; }
.pcard--feat .pcard__price:empty::before { color: var(--muted-light); }
.pcard ul { list-style: none; padding: 0; margin: .4rem 0 1.4rem; flex: 1; }
.pcard li { padding: .55rem 0; border-bottom: 1px solid var(--line-cream); font-size: .92rem; }
.pcard--feat li { border-color: var(--line-dark); }
.pcard li::before { content: '—'; color: var(--accent); margin-inline-end: .5rem; }

/* ============ STATS (compact strip) ============ */
.stats { background: var(--cream); color: var(--text-dark); border-block: 1px solid var(--line-cream); }
.stats__grid { width: var(--wrap); max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column-reverse; justify-content: center; text-align: center; padding: 1.3rem .3rem; border-inline-end: 1px solid var(--line-cream); }
.stat:last-child { border-inline-end: 0; }
.stat__val { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.35rem, 4.6vw, 1.9rem); line-height: 1.2; }
.stat__label { display: block; font-size: clamp(.62rem, 2.4vw, .74rem); color: var(--muted-dark); margin-top: .2rem; line-height: 1.4; }

/* ============ TEAM (compact rows) ============ */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; max-width: 640px; }
.member { display: flex; align-items: center; gap: .85rem; background: #ffffff; border: 1px solid var(--line-cream); border-radius: 16px; padding: .6rem; }
.member img { width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: cover; filter: grayscale(.35); transition: filter .5s; }
.member:hover img { filter: none; }
.member h4 { margin: 0; font-size: .95rem; font-weight: 600; line-height: 1.4; }
.member p { margin: 0; font-size: .74rem; color: var(--muted-dark); direction: ltr; text-align: end; }
#team .display { font-size: clamp(1.9rem, 5.5vw, 3rem); }

/* ============ CONTACT — one WhatsApp action ============ */
.cta-wa {
  background:
    radial-gradient(70% 80% at 50% 110%, rgba(59,130,246,.22), transparent 70%),
    var(--ink);
  padding: clamp(5.5rem, 14vw, 9rem) 0;
  text-align: center;
}
.cta-wa__inner { display: flex; flex-direction: column; align-items: center; }
.cta-wa .lead { margin-bottom: 2.4rem; }
.btn-wa {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: 1.15rem 2.2rem; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 1.1rem; font-weight: 600;
  box-shadow: 0 14px 40px -12px rgba(59,130,246,.7);
  transition: transform .3s var(--ease), box-shadow .3s, background .25s;
}
.btn-wa svg { width: 24px; height: 24px; }
.btn-wa:hover { transform: translateY(-3px); background: var(--accent-strong); box-shadow: 0 20px 50px -14px rgba(59,130,246,.85); }

/* ============ FOOTER ============ */
.foot { background: var(--cream-2); color: var(--text-dark); padding: 4rem 0 2rem; }
.foot__brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: .14em; font-size: 1.3rem; direction: ltr; justify-content: flex-end; }
.foot__brand svg { width: 34px; height: 34px; }
.foot__tag { max-width: 380px; color: var(--muted-dark); font-size: .9rem; margin: 1rem 0 2.4rem; }
.foot__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 460px; padding-bottom: 2.4rem; border-bottom: 1px solid var(--line-cream); }
.foot__cols h5 { margin: 0 0 .8rem; font-size: .85rem; font-weight: 600; }
.foot__cols a { display: block; font-size: .88rem; color: var(--muted-dark); padding: .25rem 0; }
.foot__cols a:hover { color: var(--text-dark); }
.foot__copy { margin: 1.6rem 0 0; font-size: .78rem; color: var(--muted-dark); text-align: center; }

/* ============ FAB ============ */
.fab { position: fixed; z-index: 30; bottom: max(18px, env(safe-area-inset-bottom)); inset-inline-start: 18px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--text-dark); color: var(--cream); box-shadow: 0 10px 28px -8px rgba(0,0,0,.55); border: 1px solid rgba(232,237,233,.12); transition: transform .3s var(--ease); }
.fab:hover { transform: scale(1.06); }
.fab svg { width: 24px; height: 24px; }

/* ============ REVEAL ============ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============ 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; }
  [data-reveal], .hero__title .line > span, .hero__sub, .hero__cta, .hero .eyebrow { opacity: 1 !important; transform: none !important; }
  .manifesto__text .w { color: var(--text-light); }
}

/* Small blue text/fills on light backgrounds use the darker blue for contrast */
.sec--cream .eyebrow, .sec--cream .pcard__price, .pcard li::before { color: var(--accent-strong); }
.sec--cream .eyebrow .rule { background: var(--accent-strong); }
.btn--accent, .chip-sm--accent, .badge--status { background: var(--accent-strong); }
.pcard--feat .pcard__price { color: var(--accent); }

/* ============ ENGLISH (LTR) ============ */
html[lang="en"] {
  --f-display: 'Cormorant Garamond', Georgia, serif;
}
html[lang="en"] .display, html[lang="en"] .hero__title { letter-spacing: -.01em; }
html[lang="en"] .hero__title { font-weight: 500; line-height: 1.02; }
html[lang="en"] .hero__title .line { padding-bottom: .16em; margin-bottom: -.12em; }
html[lang="en"] .manifesto__text { font-weight: 400; }
html[lang="en"] .pcard__price:empty::before { content: 'Priced per project'; }
html[lang="en"] .member p { text-align: start; }
html[lang="en"] .foot__brand { justify-content: flex-start; }
.nav__lang { border: 0; background: transparent; color: inherit; cursor: pointer; }

/* Performance: hero animations stop when the hero is off screen, and weak
   devices get a lighter blur (blur is the costly part of the aurora). */
.hero__bg.is-paused .aurora, .hero__bg.is-paused .code-rain pre { animation-play-state: paused; }
.is-lite .aurora--a { filter: blur(32px); }
.is-lite .aurora--b { display: none; }

/* ============ CLIENT LOGO STRIP (under the hero) ============ */
.logos { background: var(--ink); padding: 1.6rem 0 2.2rem; border-bottom: 1px solid var(--line-dark); overflow: hidden; }
.logos__label { text-align: center; color: var(--muted-light); margin: 0 0 1.2rem; }
/* Generic endless marquee (logos + reviews). js fills two identical halves. */
.marquee { overflow: hidden; direction: ltr;   /* track must start at the left edge, even on RTL pages */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; direction: ltr; animation: marquee var(--marquee-dur, 40s) linear infinite; }
[dir="rtl"] .marquee__track { animation-direction: reverse; }   /* Arabic: drift with the reading direction */
.marquee__track.is-paused, .marquee__track.is-held, .marquee__track:hover { animation-play-state: paused; }
.marquee__half { display: flex; align-items: stretch; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee--logos .marquee__half { align-items: center; gap: clamp(2.4rem, 6vw, 4rem); padding-inline-end: clamp(2.4rem, 6vw, 4rem); }
.marquee--reviews { margin-top: .5rem; padding: 4px 0 10px; }
.marquee--reviews .marquee__half { gap: 14px; padding-inline-end: 14px; }
.marquee--reviews .review { width: min(340px, 80vw); flex: none; }
[dir="rtl"] .marquee .review { direction: rtl; }
[dir="ltr"] .marquee .review { direction: ltr; }
.logos__item { display: grid; place-items: center; height: 44px; }
.logos__item img { height: 30px; max-width: 130px; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .55; transition: opacity .3s; }
.logos__item:hover img { opacity: .95; }
/* a logo with its own solid background stays in colour, as a small rounded tile */
.logos__item.is-tile img { filter: none; opacity: .9; border-radius: 8px; max-height: 40px; }

/* ============ REVIEWS ============ */
.review { margin: 0; background: #fff; border: 1px solid var(--line-cream); border-radius: var(--radius); padding: 1.6rem 1.5rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; color: var(--text-dark); }
.review__mark { font-family: "Cormorant Garamond", Georgia, serif; font-size: 4rem; line-height: .6; color: var(--accent); height: 1.6rem; }
.review blockquote { margin: 0; flex: 1; font-size: .98rem; line-height: 1.85; color: #2a302c; }
.review figcaption { display: flex; align-items: center; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--line-cream); }
.review__avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--text-dark); color: var(--cream); font-weight: 600; font-size: .9rem; }
.review figcaption strong { display: block; font-size: .95rem; }
.review figcaption small { display: block; font-size: .76rem; color: var(--muted-dark); }
.review--big { background: var(--dark-2); border-color: var(--line-dark); color: var(--text-light); max-width: 760px; margin-top: 2.4rem; }
.review--big blockquote { color: var(--text-light); font-size: clamp(1.05rem, 2.6vw, 1.3rem); }
.review--big figcaption { border-color: var(--line-dark); }
.review--big figcaption small { color: var(--muted-light); }

/* ============ PROJECT CARD ACTIONS ============ */
.pcard-p__actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.btn--line { border-color: var(--line-cream); color: var(--text-dark); background: transparent; padding-inline: 1rem; font-size: .85rem; }
.btn--line:hover { border-color: var(--text-dark); }

/* ============ SHARED PAGE BITS ============ */
.display--sm { font-size: clamp(2rem, 6vw, 3.3rem); }
.display em { font-style: normal; color: var(--accent); }
.page-hero { background: var(--ink); padding: clamp(7.5rem, 16vw, 10rem) 0 clamp(3rem, 8vw, 5rem); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; width: 90vmax; height: 60vmax; top: -40vmax; inset-inline-start: -20vmax; background: radial-gradient(circle, rgba(59,130,246,.28), transparent 62%); filter: blur(40px); pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero .lead { color: var(--muted-light); }

/* ============ PROJECT STORY ============ */
.story-hero { background: var(--ink); padding: clamp(6.5rem, 14vw, 9rem) 0 clamp(2.5rem, 6vw, 4rem); position: relative; overflow: hidden; }
.story-hero::before { content: ""; position: absolute; width: 100vmax; height: 70vmax; top: -45vmax; inset-inline-end: -30vmax; background: radial-gradient(circle, rgba(59,130,246,.3), transparent 62%); filter: blur(40px); pointer-events: none; }
.story-hero .wrap { position: relative; }
.story-back { display: inline-block; color: var(--muted-light); font-size: .88rem; margin-bottom: 1.8rem; }
.story-back:hover { color: var(--text-light); }
.story-hero__logo { width: min(240px, 70%); height: 96px; border-radius: 18px; border: 1px solid var(--line-dark); margin-bottom: 1.8rem; }
.story-hero__logo .pcard-p__logo { padding: 1rem 1.4rem; }
.story-hero__logo .pcard-p__logo img { max-height: 52px; max-width: 80%; }
.story-hero__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 8vw, 4.6rem); line-height: 1.2; margin: 0 0 1rem; }
.story-hero__sub { max-width: 640px; color: rgba(232,237,233,.78); font-size: clamp(1rem, 2.4vw, 1.2rem); margin: 0 0 1.8rem; }
.story-hero__sub b, .story-hero__sub strong { color: var(--text-light); font-weight: 600; }
.story-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2rem; }
.story-meta div { background: rgba(232,237,233,.06); border: 1px solid var(--line-dark); border-radius: 12px; padding: .5rem .85rem; }
.story-meta dt { font-size: .68rem; color: var(--muted-light); }
.story-meta dd { margin: 0; font-size: .86rem; font-weight: 500; }
.story-shot { background: linear-gradient(180deg, var(--ink) 55%, var(--cream) 55%); padding: 0 0 clamp(3rem, 8vw, 5rem); }
.story-shot .wrap { display: grid; gap: 18px; }
.browser { margin: 0; border-radius: 16px; overflow: hidden; background: var(--dark-2); border: 1px solid var(--line-dark); box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
.browser__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #141a16; }
.browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(232,237,233,.18); }
.browser__bar span { margin-inline-start: 10px; font: 400 .72rem var(--f-mono); color: var(--muted-light); direction: ltr; }
.browser img { width: 100%; height: auto; display: block; }
.story-cols { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .story-cols { grid-template-columns: 1fr 2fr; gap: 3rem; } }
.story-lead { font-size: clamp(1.1rem, 2.6vw, 1.35rem); line-height: 1.75; margin: 0 0 1.2rem; }
.sec--cream .story-lead { color: var(--text-dark); }
.story-block p { line-height: 1.9; }
.story-block.sec--cream p { color: #3a403c; }
.story-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .6rem; }
.story-list li { position: relative; padding-inline-start: 1.7rem; line-height: 1.75; }
.story-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 14px; height: 14px; border-radius: 50%; background: rgba(59,130,246,.15); box-shadow: inset 0 0 0 4px var(--accent-strong); }
.story-list--dark li { color: var(--text-light); }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 2rem; }
.feat { background: #fff; border: 1px solid var(--line-cream); border-radius: 18px; padding: 1.3rem 1.3rem 1.4rem; }
.feat h4 { margin: 0 0 .4rem; font-size: 1.02rem; font-weight: 600; }
.feat p { margin: 0; font-size: .9rem; color: #4a524d; line-height: 1.75; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1px; margin-top: 1.6rem; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: 18px; overflow: hidden; }
.metric { background: var(--dark); padding: 1.5rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.metric strong { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.1; color: var(--accent); unicode-bidi: plaintext; }
.metric span { font-size: .85rem; color: var(--muted-light); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.stack span { font: 500 .8rem var(--f-mono); padding: .45rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line-cream); direction: ltr; }
.story-next { display: flex; flex-direction: column; align-items: center; gap: .2rem; margin-top: 2.6rem; color: var(--muted-light); }
.story-next span { color: var(--text-light); font-size: 1.1rem; font-weight: 500; }
.story-next:hover span { color: var(--accent); }
.story-missing { padding-top: 10rem; text-align: center; }

/* ============ FAQ ============ */
.faq { max-width: 820px; display: grid; gap: 10px; }
.faq__item { background: #fff; border: 1px solid var(--line-cream); border-radius: 16px; overflow: hidden; }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.3rem; font-weight: 600; font-size: 1.02rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; margin-inline-start: auto; font-size: 1.4rem; font-weight: 300; color: var(--muted-dark); transition: transform .3s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary .mono { color: var(--accent-strong); }
.faq__a { padding: 0 1.3rem 1.3rem; color: #3a403c; line-height: 1.9; }
.faq__a b, .faq__a strong { color: var(--text-dark); }

/* ============ PROCESS ============ */
.steps { list-style: none; margin: 0; padding: 0; max-width: 860px; position: relative; }
.steps::before { content: ""; position: absolute; top: 12px; bottom: 12px; inset-inline-start: 23px; width: 1px; background: var(--line-cream); }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 1.2rem; padding-bottom: 2.4rem; position: relative; }
.step__num { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--text-dark); color: var(--cream); position: relative; }
.step__body h3 { margin: .6rem 0 .5rem; font-size: 1.2rem; font-weight: 600; }
.step__body p { margin: 0; color: #3a403c; line-height: 1.85; }

/* ============ LEGAL ============ */
html[lang="en"] [data-lang="ar"], html[lang="ar"] [data-lang="en"] { display: none; }
.legal { max-width: 780px; color: #2a302c; }
.legal h2 { font-size: 1.25rem; font-weight: 600; margin: 2.2rem 0 .6rem; color: var(--text-dark); }
.legal h3 { font-size: 1.02rem; font-weight: 600; margin: 1.4rem 0 .4rem; }
.legal p, .legal li { line-height: 1.9; }
.legal ul { padding-inline-start: 1.2rem; }
.legal a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.legal code { font-family: var(--f-mono); font-size: .85em; background: var(--cream-2); padding: .1rem .35rem; border-radius: 6px; }
.legal__contact { margin-top: 2.6rem; background: #fff; border: 1px solid var(--line-cream); border-radius: 18px; padding: 1.3rem 1.4rem; }
.legal__contact h3 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---- tweaks (round 9) ---- */
/* no category filter chips (removed on all screens) — the full list is short enough to scroll */
.chips { display: none; }
/* less air between the projects grid and the reviews below it */
#projects { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.reviews-sec { padding-top: clamp(1.5rem, 4vw, 3rem); }
/* floating button = WhatsApp (brand green, official glyph) */
.fab { background: #25D366; color: #fff; border: 0; box-shadow: 0 12px 28px -8px rgba(37,211,102,.55); }
.fab svg { width: 28px; height: 28px; }

/* ---- admin-driven options (sync with the classic site) ---- */
/* client logo with "ألوان أصلية" keeps its colours */
.logos__item.is-color img { filter: none; opacity: .95; }
/* "حركة الشريط: ثابت" → a still, centred, wrapping row */
.marquee__track.is-still { width: 100%; animation: none; justify-content: center; }
.marquee__track.is-still .marquee__half { flex-wrap: wrap; justify-content: center; width: 100%; padding-inline: 20px; row-gap: 1.6rem; }
.marquee:has(.is-still) { -webkit-mask-image: none; mask-image: none; }
/* team: bio + social links from the admin */
.member { align-items: flex-start; }
.member__body { min-width: 0; }
.member__role { margin: 0; font-size: .74rem; color: var(--muted-dark); direction: ltr; text-align: end; }
html[lang="en"] .member__role { text-align: start; }
.member__bio { margin: .45rem 0 0; font-size: .82rem; line-height: 1.7; color: #3a403c; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.member__links { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .55rem; }
.member__links a { font-size: .74rem; font-weight: 500; color: var(--accent-strong); }
.member__links a:hover { text-decoration: underline; }
#teamSub { max-width: 640px; }
.member .member__bio { direction: inherit; text-align: start; }
