/* ============================================================
   YESSR - styles.css
   Mobile-first. No framework, no preprocessor.

   Layout is written with CSS *logical properties*
   (margin-inline-start, padding-inline, text-align: start, ...)
   instead of left/right. That is what makes the whole page mirror
   itself when <html dir="rtl"> is set for Arabic - nav, cards,
   footer and all - without a separate Arabic stylesheet.
   Only a handful of genuinely directional bits are patched in the
   "RTL adjustments" block at the bottom.

   Table of contents
     1. Tokens
     2. Reset & base
     3. Layout helpers
     4. Buttons
     5. Header / nav / language switcher
     6. Hero
     7. Services
     8. Process
     9. Projects
    10. Why Yessr
    11. Contact
    12. Footer
    13. Dark theme
    14. Theme toggle
    15. RTL adjustments
    16. Motion preferences
   ============================================================ */

/* ---------- 1. Tokens -------------------------------------
   Two layers:
     - BRAND constants: the five Yessr colours. They never change.
     - SEMANTIC tokens: what a colour is *for* (page background, card
       surface, body text...). Only these are redefined for dark mode,
       so every component rule below is written once and works in both
       themes. Never hardcode a brand colour in a component rule - go
       through a semantic token, or dark mode will break.
   ---------------------------------------------------------- */
:root {
  color-scheme: light;

  /* ---- brand constants ---- */
  --navy:        #1F3864;
  --navy-soft:   #2c4a80;
  --teal:        #0E7C86;
  --teal-dark:   #0b636b;
  --mint:        #5DCAA5;
  --mint-soft:   #e4f6ef;
  --gray:        #F2F5F4;
  --gray-line:   #dde5e3;
  --white:       #FFFFFF;

  /* ---- semantic tokens: light ---- */
  --bg:          #FFFFFF;            /* page background */
  --bg-alt:      #F2F5F4;            /* alternating section background */
  --surface:     #FFFFFF;            /* cards, form, header panel */
  --surface-2:   #F2F5F4;            /* subtle fills - badges, switches */
  --line:        #dde5e3;            /* borders and rules */

  --heading:     #1F3864;
  --text:        #1F3864;            /* body copy - navy, never pure black */
  --text-muted:  rgba(31, 56, 100, .72);
  --text-faint:  rgba(31, 56, 100, .58);

  --accent:       #0E7C86;           /* links, primary buttons, icons */
  --accent-hover: #0b636b;
  --accent-soft:  #e4f6ef;           /* tinted chip behind an accent icon */
  --on-accent:    #FFFFFF;           /* text on top of --accent */

  --solid:        #1F3864;           /* filled navy chips and buttons */
  --solid-hover:  #2c4a80;
  --on-solid:     #FFFFFF;

  --header-bg:    rgba(255, 255, 255, .92);
  --hero-glow-1:  #e4f6ef;
  --hero-glow-2:  rgba(228, 246, 239, 0);
  --focus-ring:   rgba(14, 124, 134, .16);
  --danger:       #c0392b;

  /* the footer is dark in both themes, so it carries its own set */
  --footer-bg:    #1F3864;
  --footer-text:  rgba(255, 255, 255, .78);
  --footer-muted: rgba(255, 255, 255, .68);
  --footer-faint: rgba(255, 255, 255, .6);
  --footer-line:  rgba(255, 255, 255, .14);
  --footer-chip:  rgba(255, 255, 255, .09);

  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-arabic:  "Noto Sans Arabic", "Cairo", "Segoe UI", Tahoma, sans-serif;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(31, 56, 100, .06), 0 2px 8px rgba(31, 56, 100, .05);
  --shadow:    0 4px 12px rgba(31, 56, 100, .07), 0 14px 34px rgba(31, 56, 100, .08);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, .45);

  --header-h:  68px;
  --container: 1140px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Arabic locale: swap the Latin faces for a full Arabic family.
   Applied on <html lang="ar"> so every descendant inherits it. */
html[lang="ar"] {
  --font-body:    var(--font-arabic);
  --font-display: var(--font-arabic);
}

/* ---------- 2. Reset & base -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* class-level `display` would otherwise override the HTML `hidden`
   attribute (used by the logo text fallbacks) */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* keeps anchored sections clear of the sticky header */
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.45; }

p  { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 999;
  background: var(--solid);
  color: var(--on-solid);
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: var(--on-solid); }

/* ---------- 3. Layout helpers ------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: 64px; }
.section--alt { background: var(--bg-alt); }

.section__head {
  max-width: 640px;
  margin-inline: auto;
  margin-block-end: 40px;
  text-align: center;
}
.section__title    { font-size: clamp(1.6rem, 4.6vw, 2.25rem); }
.section__subtitle { color: var(--text-muted); font-size: 1.02rem; margin: 0; }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .6rem;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; }

.grid { display: grid; gap: 20px; }

/* ---------- 4. Buttons ------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease),
              box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); box-shadow: var(--shadow); }

.btn--ghost { background: transparent; color: var(--heading); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

.btn--whatsapp { background: var(--solid); color: var(--on-solid); }
.btn--whatsapp:hover { background: var(--solid-hover); color: var(--on-solid); }
.btn--whatsapp svg { width: 20px; height: 20px; flex: none; }

.btn--sm  { padding: .52rem 1rem; font-size: .88rem; }
.btn--lg  { padding: .85rem 1.6rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------- 5. Header / nav -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--line);
}
.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -.01em;
  flex: none;
}
.brand:hover { color: var(--heading); }
.brand__mark { width: 38px; height: 38px; border-radius: 9px; }

/* Text fallback shown only if the SVG fails to load (see onerror in HTML) */
.brand__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--solid);
  color: var(--mint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand__fallback--dark { background: var(--mint); color: var(--navy); }
.brand--dark, .brand--dark:hover { color: #FFFFFF; }
.brand--dark .brand__mark { border-radius: 10px; }

/* burger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.site-nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--surface);
  border-block-end: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 14px 20px 22px;
  display: none;
}
.site-nav.is-open { display: block; }

.site-nav__list { display: flex; flex-direction: column; }
.site-nav__list a {
  display: block;
  padding: .7rem .2rem;
  color: var(--text);
  font-weight: 500;
  border-block-end: 1px solid var(--line);
}
.site-nav__list a:hover { color: var(--accent); }

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-start: 18px;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 999px;
  flex: none;
}
.lang-switch__btn {
  padding: .32rem .7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.lang-switch__btn:hover { color: var(--heading); }
.lang-switch__btn[aria-current="true"] {
  background: var(--surface);
  color: var(--heading);
  box-shadow: var(--shadow-sm);
}
.lang-switch__btn[lang="ar"] { font-family: var(--font-arabic); font-size: .88rem; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
    flex: 1;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .site-nav__list { flex-direction: row; gap: 22px; }
  .site-nav__list a { padding: .3rem 0; border: 0; font-size: .94rem; }
  .site-nav__actions { margin-block-start: 0; flex-wrap: nowrap; }
}

/* ---------- 6. Hero ---------------------------------------- */
.hero {
  padding-block: 48px 56px;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--hero-glow-1) 0%, var(--hero-glow-2) 58%),
    var(--bg);
}
.hero__inner { display: grid; gap: 34px; align-items: center; }
.hero__title {
  font-size: clamp(2rem, 7.2vw, 3.15rem);
  margin-block-end: .55rem;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.6vw, 1.13rem);
  color: var(--text-muted);
  max-width: 46ch;
  margin-block-end: 1.6rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-block-start: 22px;
  font-size: .92rem;
  color: var(--text-faint);
}
.hero__points li { display: flex; align-items: center; gap: .5rem; }
.hero__points li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero__visual { justify-self: center; width: 100%; max-width: 460px; }
.flow { width: 100%; height: auto; overflow: visible; }

/* animated dashes along the connectors */
.flow__link {
  stroke-dasharray: 7 9;
  animation: flow-dash 1.9s linear infinite;
}
@keyframes flow-dash { to { stroke-dashoffset: -32; } }

.flow__halo { animation: flow-pulse 3.2s ease-in-out infinite; transform-origin: 265px 190px; }
@keyframes flow-pulse {
  0%, 100% { transform: scale(1);    opacity: .18; }
  50%      { transform: scale(1.14); opacity: .30; }
}

/* packets travelling from the sources into the core */
.flow__dot { opacity: 0; }
.flow__dot--1 { animation: flow-travel-1 3s var(--ease) infinite; }
.flow__dot--2 { animation: flow-travel-2 3s var(--ease) infinite .55s; }
.flow__dot--3 { animation: flow-travel-3 3s var(--ease) infinite 1.1s; }
@keyframes flow-travel-1 {
  0%   { transform: translate(92px, 70px);  opacity: 0; }
  12%  { opacity: 1; }
  70%  { transform: translate(229px, 190px); opacity: 1; }
  85%, 100% { transform: translate(229px, 190px); opacity: 0; }
}
@keyframes flow-travel-2 {
  0%   { transform: translate(92px, 190px); opacity: 0; }
  12%  { opacity: 1; }
  70%  { transform: translate(229px, 190px); opacity: 1; }
  85%, 100% { transform: translate(229px, 190px); opacity: 0; }
}
@keyframes flow-travel-3 {
  0%   { transform: translate(92px, 310px); opacity: 0; }
  12%  { opacity: 1; }
  70%  { transform: translate(229px, 190px); opacity: 1; }
  85%, 100% { transform: translate(229px, 190px); opacity: 0; }
}

@media (min-width: 900px) {
  .hero { padding-block: 76px 88px; }
  .hero__inner { grid-template-columns: 1.05fr .95fr; gap: 48px; }
}

/* ---------- 7. Services ------------------------------------ */
.grid--services { grid-template-columns: 1fr; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-block-end: 16px;
}
.card__icon svg { width: 25px; height: 25px; }
.card__title { font-size: 1.13rem; margin-block-end: .4rem; }
.card__text  { color: var(--text-muted); font-size: .96rem; margin: 0; }

@media (min-width: 620px)  { .grid--services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--services { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 8. Process ------------------------------------- */
.steps { display: grid; gap: 18px; counter-reset: step; }

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--solid);
  color: var(--on-solid);
  font-family: var(--font-display);
  font-weight: 700;
  margin-block-end: 14px;
}
.step__title { font-size: 1.1rem; margin-block-end: .35rem; }
.step__text  { color: var(--text-muted); font-size: .96rem; margin: 0; }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  /* connector between the three cards - drawn with logical insets so it
     flips together with the rest of the layout in Arabic */
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 46px;
    inset-inline-end: -24px;
    width: 24px;
    border-block-start: 2px dashed var(--accent);
  }
}

/* ---------- 9. Projects ------------------------------------ */
.grid--projects { grid-template-columns: 1fr; align-items: stretch; }

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Fallback graphic: a 4-step mini workflow, drawn for any project that has
   no `cover` screenshot set yet in the projects array in script.js.
   Both variants share this wrapper, so card sizing stays identical. */
.project-card__visual {
  background: linear-gradient(135deg, #1F3864 0%, #0E7C86 100%);
  padding: 26px 18px;
}
.project-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.project-flow__step {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  color: #FFFFFF;
}
.project-flow__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-inline: auto;
  border-radius: 13px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(93, 202, 165, .5);
  color: var(--mint);
}
.project-flow__icon svg { width: 22px; height: 22px; }
.project-flow__label {
  display: block;
  margin-block-start: 8px;
  font-size: .65rem;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(255, 255, 255, .92);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
.project-flow__arrow {
  flex: none;
  align-self: center;
  margin-block-start: -14px;
  color: rgba(93, 202, 165, .8);
  font-size: 1rem;
  line-height: 1;
}

/* Screenshot cover. It is a <button> - the whole image opens the lightbox. */
.project-card__visual--shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #16233B;
  cursor: zoom-in;
  overflow: hidden;
}
.project-card__visual--shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  object-position: center top;
  transition: transform .35s var(--ease), opacity .2s var(--ease);
}
.project-card__visual--shot:hover img { transform: scale(1.035); }

.project-card__zoom {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(31, 56, 100, .82);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.project-card__zoom svg { width: 17px; height: 17px; }
.project-card__visual--shot:hover .project-card__zoom,
.project-card__visual--shot:focus-visible .project-card__zoom { opacity: 1; transform: translateY(0); }

/* small count badge, so it is clear there is more than one image */
.project-card__shotcount {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .16rem .5rem;
  border-radius: 999px;
  background: rgba(31, 56, 100, .82);
  backdrop-filter: blur(4px);
  color: var(--mint);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.project-card__shotcount svg { width: 12px; height: 12px; }

.project-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.project-card__title { font-size: 1.22rem; margin-block-end: .75rem; }

/* The four process steps, as one wrapping sequence. Deliberately flat -
   the tool badges lower down are the pills, these are the flow. */
.project-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .55rem;
  margin-block-end: 1.1rem;
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--line);
}
.project-step {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.5;
}
.project-step svg { width: 14px; height: 14px; flex: none; color: var(--accent); }
.project-step + .project-step::before {
  content: "\203A";                 /* single angle quote as the step arrow */
  margin-inline-end: .3rem;
  color: var(--accent);
  font-size: .95rem;
  font-weight: 400;
}
html[dir="rtl"] .project-step + .project-step::before { content: "\2039"; }

.project-card__block { margin-block-end: 1rem; }
.project-card__label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-block-end: .25rem;
}
html[lang="ar"] .project-card__label { letter-spacing: 0; }
.project-card__block p { margin: 0; color: var(--text-muted); font-size: .95rem; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: auto;
  padding-block-start: 8px;
}
.badge {
  padding: .28rem .7rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .78rem;
  font-weight: 500;
}

/* "coming soon" slot - reads as an intentional card, not a gap.
   To add a real project: drop a new object into `projects` in
   script.js; this slot stays last automatically. */
.project-card--soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 32px 22px;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text-faint);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.project-card--soon:hover { border-color: var(--accent); color: var(--accent); }
.project-card--soon__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1;
}
.project-card--soon__label { font-size: .95rem; font-weight: 600; margin: 0; }

.projects__teaser {
  margin: 26px 0 0;
  text-align: center;
  color: var(--text-faint);
  font-size: .95rem;
}

/* ---------- 9b. Screenshot lightbox ------------------------ */
body.is-locked { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 46, .88);
  backdrop-filter: blur(3px);
}

.lightbox__dialog {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 1180px;
}

/* the card hugs the image, so a portrait shot does not sit in a wide
   empty frame and a landscape one still fills the width */
.lightbox__figure {
  flex: 0 1 auto;
  /* never narrower than a readable caption, never wider than the image */
  min-width: min(430px, 100%);
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.lightbox__figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  margin-inline: auto;
  background: #16233B;
}

.lightbox__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  font-size: .9rem;
  color: var(--text-muted);
  /* width:0 + min-width:100% keeps a long caption from stretching the
     figure past the image it describes - it wraps instead */
  width: 0;
  min-width: 100%;
}
.lightbox__count {
  flex: none;
  color: var(--text-faint);
  font-size: .82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  /* "1 / 3" is a number pair, not prose - keep it LTR so Arabic's bidi
     reordering does not flip it into "3 / 1" */
  direction: ltr;
  unicode-bidi: isolate;
}

.lightbox__close,
.lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--mint); color: var(--navy); }

.lightbox__nav { width: 44px; height: 44px; }
.lightbox__nav svg { width: 22px; height: 22px; }

.lightbox__close {
  position: absolute;
  inset-block-start: -52px;
  inset-inline-end: 0;
  width: 40px; height: 40px;
  z-index: 1;
}
.lightbox__close svg { width: 19px; height: 19px; }

/* the chevrons are directional glyphs, so mirror them for Arabic */
html[dir="rtl"] .lightbox__nav svg { transform: scaleX(-1); }

/* On phones the arrows move below the image instead of beside it. */
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lightbox__dialog { flex-flow: row wrap; justify-content: center; gap: 12px; }
  .lightbox__figure { flex: 1 0 100%; order: -1; }
  .lightbox__figure img { max-height: calc(100vh - 250px); }
  .lightbox__close { inset-block-start: -46px; }
}

@media (min-width: 760px)  { .grid--projects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .grid--projects { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 9c. Live demo: instant automation audit -------- */
.section--demo { background: var(--bg-alt); }

/* the "live demo" ribbon on the audit project card */
.project-card__livebadge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: rgba(93, 202, 165, .16);
  border: 1px solid rgba(93, 202, 165, .45);
  color: var(--mint);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
html[lang="ar"] .project-card__livebadge { letter-spacing: 0; text-transform: none; }
.project-card__pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  animation: audit-pulse 1.8s ease-in-out infinite;
}
@keyframes audit-pulse {
  0%, 100% { opacity: 1;  transform: scale(1); }
  50%      { opacity: .4; transform: scale(.75); }
}
.project-card--live .project-card__visual { position: relative; }

.project-card__try {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-block-end: 1rem;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
}
.project-card__try svg { width: 15px; height: 15px; }
html[dir="rtl"] .project-card__try svg { transform: scaleX(-1); }
.project-card__try:hover { gap: .65rem; }

/* ---- the form ---- */
.audit__mode {
  max-width: 720px;
  margin: 0 auto 18px;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: .88rem;
  text-align: center;
}

.audit {
  max-width: 820px;
  margin-inline: auto;
}
.audit__row { display: grid; gap: 12px; }
.audit__field { display: flex; flex-direction: column; gap: .35rem; }
.audit__field label { font-size: .85rem; font-weight: 600; color: var(--heading); }
.audit__field input {
  width: 100%;
  padding: .8rem .9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.audit__field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.audit__field input:disabled { opacity: .55; cursor: not-allowed; }
.audit__hint {
  margin: .8rem 0 0;
  text-align: center;
  color: var(--text-faint);
  font-size: .85rem;
}
.audit #auditSubmit { align-self: end; white-space: nowrap; }

@media (min-width: 760px) {
  .audit__row { grid-template-columns: 1.3fr 1fr auto; align-items: end; }
}

/* ---- pipeline progress ---- */
.audit__stages {
  max-width: 820px;
  margin: 26px auto 0;
  display: grid;
  gap: 10px;
}
.audit__stage {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--text-faint);
  font-size: .92rem;
  transition: color .25s var(--ease);
}
.audit__dot {
  width: 10px; height: 10px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line);
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.audit__stage.is-active { color: var(--heading); font-weight: 600; }
.audit__stage.is-active .audit__dot {
  border-color: var(--accent);
  animation: audit-pulse 1.2s ease-in-out infinite;
}
.audit__stage.is-done { color: var(--text-muted); }
.audit__stage.is-done .audit__dot { background: var(--accent); border-color: var(--accent); }

@media (min-width: 760px) {
  .audit__stages { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .audit__stage { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

.audit__error {
  max-width: 820px;
  margin: 20px auto 0;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: .92rem;
  font-weight: 500;
  text-align: center;
}

.audit__sample {
  max-width: 900px;
  margin: 0 auto 14px;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  color: var(--text-faint);
  font-size: .85rem;
  text-align: center;
}

/* ---- the report ---- */
.audit__report { margin-block-start: 30px; }

.report {
  max-width: 900px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}

.report__head { display: grid; gap: 22px; margin-block-end: 24px; }
.report__company { font-size: 1.4rem; margin-block-end: .25rem; }
.report__meta { color: var(--text-faint); font-size: .9rem; margin-block-end: .8rem; }
.report__summary { color: var(--text-muted); font-size: .98rem; margin: 0; }

/* readiness ring */
.gauge {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  width: 168px;
  justify-self: center;
  text-align: center;
}
.gauge svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: var(--line); stroke-width: 8; }
.gauge__value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray .9s var(--ease);
}
.gauge__num {
  position: absolute;
  top: 34px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.gauge__label { font-size: .78rem; font-weight: 600; color: var(--text-muted); margin-block-start: .3rem; }
.gauge__band { font-size: .78rem; color: var(--accent); font-weight: 600; }

@media (min-width: 720px) {
  .report { padding: 32px 30px; }
  .report__head { grid-template-columns: 1fr auto; align-items: center; }
}

.report__tiles { display: grid; gap: 12px; margin-block-end: 28px; }
.tile {
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  text-align: center;
}
.tile--accent { background: var(--accent-soft); border-color: transparent; }
.tile__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.tile--accent .tile__num { color: var(--accent); }
.tile__label { display: block; margin-block-start: .3rem; font-size: .82rem; color: var(--text-muted); }

@media (min-width: 620px) { .report__tiles { grid-template-columns: repeat(3, 1fr); } }

.report__section {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-block-end: 14px;
}
html[lang="ar"] .report__section { letter-spacing: 0; }

.findings { display: grid; gap: 14px; }
.finding {
  padding: 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.finding__head {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
  margin-block-end: .7rem;
}
.finding__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--solid);
  color: var(--on-solid);
  font-size: .78rem;
  font-weight: 700;
  align-self: center;
}
.finding__name { flex: 1; min-width: 180px; font-size: 1.05rem; margin: 0; }
.finding__cost { display: flex; gap: .75rem; align-items: baseline; font-variant-numeric: tabular-nums; }
.finding__hours { font-weight: 700; color: var(--heading); }
.finding__saving { font-weight: 700; color: var(--accent); }

/* A figure and its unit are one LTR run in every language. Without this,
   Arabic's bidi reordering turns "11 h" into "h 11". */
.tile__num,
.finding__hours,
.finding__saving,
.finding__effort,
.gauge__num { direction: ltr; unicode-bidi: isolate; }

.finding__build { margin: 0 0 .5rem; color: var(--text-muted); font-size: .94rem; }
.finding__build strong { color: var(--heading); font-weight: 600; }
.finding__evidence {
  margin: 0 0 .8rem;
  padding-inline-start: .8rem;
  border-inline-start: 2px solid var(--line);
  color: var(--text-faint);
  font-size: .88rem;
  font-style: italic;
}
.finding__evidence span {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-block-end: .2rem;
}
html[lang="ar"] .finding__evidence span { letter-spacing: 0; }
.finding__foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.finding__effort { color: var(--text-faint); font-size: .8rem; font-variant-numeric: tabular-nums; }

.quickwin {
  margin-block-start: 22px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.quickwin__label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-block-end: .35rem;
}
html[lang="ar"] .quickwin__label { letter-spacing: 0; }
.quickwin strong { color: var(--heading); font-size: 1.02rem; }
.quickwin p { margin: .35rem 0 0; color: var(--text-muted); font-size: .94rem; }

.report__basis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-block-start: 22px;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--line);
  color: var(--text-faint);
  font-size: .82rem;
}
.report__basis-label { font-weight: 700; color: var(--text-muted); }

.report__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-block-start: 26px;
}

/* ---------- 10. Why Yessr ---------------------------------- */
.grid--why { grid-template-columns: 1fr; gap: 22px; }

.reason { display: flex; align-items: flex-start; gap: 14px; }
.reason__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--solid);
  color: var(--mint);
}
.reason__icon svg { width: 22px; height: 22px; }
.reason__title { font-size: 1.05rem; margin-block-end: .25rem; }
.reason__text  { color: var(--text-muted); font-size: .95rem; margin: 0; }

@media (min-width: 700px)  { .grid--why { grid-template-columns: repeat(2, 1fr); gap: 28px 34px; } }
@media (min-width: 1060px) { .grid--why { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 11. Contact ------------------------------------ */
.section--contact { background: var(--bg-alt); }

.contact { display: grid; gap: 34px; }
.contact__intro .section__title { font-size: clamp(1.5rem, 4.4vw, 2rem); }
.contact__intro .section__subtitle { margin-block-end: 1.6rem; }

.contact__direct { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}
.contact__email:hover { color: var(--accent); }
.contact__email svg { width: 20px; height: 20px; flex: none; }
.contact__note { margin-block-start: 1.2rem; color: var(--text-faint); font-size: .9rem; }

.contact__form {
  display: grid;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
}
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--heading); }
.field__opt { font-weight: 400; color: var(--text-faint); }

.field input,
.field textarea {
  width: 100%;
  padding: .72rem .85rem;
  font-family: var(--font-body);
  font-size: .96rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.field input.is-invalid,
.field textarea.is-invalid { border-color: var(--danger); }

.form-status {
  margin: .9rem 0 0;
  font-size: .92rem;
  font-weight: 500;
  min-height: 1.4em;
}
.form-status--ok    { color: var(--accent); }
.form-status--error { color: var(--danger); }

@media (min-width: 900px) {
  .contact { grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: start; }
  .contact__form { padding: 30px 28px; grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}

/* ---------- 12. Footer ------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: 48px 22px;
}
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--mint); }

.site-footer__inner { display: grid; gap: 32px; }
.site-footer__tagline {
  margin-block-start: 14px;
  max-width: 34ch;
  font-size: .95rem;
  color: var(--footer-muted);
}
.site-footer__heading {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 .9rem;
}
html[lang="ar"] .site-footer__heading { letter-spacing: 0; }
.site-footer__col ul { display: grid; gap: .55rem; font-size: .94rem; }

.site-footer__col .socials { display: flex; gap: 10px; margin-block-start: 20px; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--footer-chip);
  color: #FFFFFF;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.socials a:hover { background: var(--mint); color: var(--navy); }
.socials svg { width: 19px; height: 19px; }

.site-footer__bottom {
  margin-block-start: 34px;
  padding-block-start: 20px;
  border-block-start: 1px solid var(--footer-line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--footer-faint);
}
.site-footer__bottom p { margin: 0; }

@media (min-width: 760px) {
  .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}


/* ---------- 13. Dark theme ---------------------------------
   Only the semantic tokens are redefined - no component rule is
   repeated. Three states are covered on purpose:
     :root                            -> light (defined above)
     prefers-color-scheme: dark       -> dark, unless the visitor
                                         explicitly picked light
     [data-theme="dark"]              -> dark, whatever the OS says
   The toggle in the header writes data-theme on <html>.
   ---------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg:          #0E1829;
    --bg-alt:      #131F33;
    --surface:     #17253C;
    --surface-2:   #1E2E48;
    --line:        rgba(214, 228, 246, .15);

    --heading:     #EAF1FA;
    --text:        #CBD9EC;
    --text-muted:  rgba(203, 217, 236, .76);
    --text-faint:  rgba(203, 217, 236, .58);

    /* teal is too dark to read on a navy ground - mint carries the
       accent role in dark mode, and buttons invert to navy text */
    --accent:       #5DCAA5;
    --accent-hover: #7EDCBB;
    --accent-soft:  rgba(93, 202, 165, .15);
    --on-accent:    #0E1829;

    --solid:        #2A3F63;
    --solid-hover:  #35507D;
    --on-solid:     #EAF1FA;

    --header-bg:    rgba(14, 24, 41, .9);
    --hero-glow-1:  rgba(93, 202, 165, .13);
    --hero-glow-2:  rgba(93, 202, 165, 0);
    --focus-ring:   rgba(93, 202, 165, .22);
    --danger:       #FF9B8F;

    --footer-bg:    #0A1220;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .22);
    --shadow:    0 4px 12px rgba(0, 0, 0, .34), 0 14px 34px rgba(0, 0, 0, .38);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:          #0E1829;
  --bg-alt:      #131F33;
  --surface:     #17253C;
  --surface-2:   #1E2E48;
  --line:        rgba(214, 228, 246, .15);

  --heading:     #EAF1FA;
  --text:        #CBD9EC;
  --text-muted:  rgba(203, 217, 236, .76);
  --text-faint:  rgba(203, 217, 236, .58);

  --accent:       #5DCAA5;
  --accent-hover: #7EDCBB;
  --accent-soft:  rgba(93, 202, 165, .15);
  --on-accent:    #0E1829;

  --solid:        #2A3F63;
  --solid-hover:  #35507D;
  --on-solid:     #EAF1FA;

  --header-bg:    rgba(14, 24, 41, .9);
  --hero-glow-1:  rgba(93, 202, 165, .13);
  --hero-glow-2:  rgba(93, 202, 165, 0);
  --focus-ring:   rgba(93, 202, 165, .22);
  --danger:       #FF9B8F;

  --footer-bg:    #0A1220;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .22);
  --shadow:    0 4px 12px rgba(0, 0, 0, .34), 0 14px 34px rgba(0, 0, 0, .38);
}

/* The two logo files are drawn for opposite grounds, so show whichever
   matches the current theme. Both sit in the markup; CSS picks one. */
.brand__mark--dark { display: none; }
:root[data-theme="dark"] .brand__mark--light { display: none; }
:root[data-theme="dark"] .brand__mark--dark  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__mark--light { display: none; }
  :root:not([data-theme="light"]) .brand__mark--dark  { display: block; }
}

/* The hero illustration is inline SVG, so its "paper" parts follow the
   theme. CSS beats the fill/stroke attributes in the markup. */
.flow__node   { fill: var(--surface); stroke: var(--heading); }
.flow__bar    { fill: var(--text-muted); }
.flow__out    { fill: var(--solid); }
.flow__accent { fill: var(--accent); }
.flow__link--accent { stroke: var(--accent); }

/* ---------- 14. Theme toggle ------------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--heading);
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* show the icon for the theme you would switch TO */
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun  { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun  { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}

/* ---------- 15. RTL adjustments ----------------------------
   Everything above is direction-agnostic thanks to logical
   properties. Only these genuinely one-sided details need a patch. */
html[dir="rtl"] body { text-align: start; }

/* the hero gradient comes from the top-right; mirror it */
html[dir="rtl"] .hero {
  background:
    radial-gradient(120% 90% at 0% 0%, var(--hero-glow-1) 0%, var(--hero-glow-2) 58%),
    var(--bg);
}

/* the process arrows are drawn as dashes, but the project-flow chevrons
   are literal glyphs, so flip them */
html[dir="rtl"] .project-flow__arrow { transform: scaleX(-1); }

/* Mirror the hero illustration so the workflow reads right-to-left too.
   The dashes and the travelling packets flip with it automatically; only
   the "AI" lettering inside the core has to be flipped back. */
html[dir="rtl"] .flow { transform: scaleX(-1); }
html[dir="rtl"] .flow__glyph {
  transform: scaleX(-1);
  transform-box: fill-box;
  transform-origin: center;
}

/* Arabic reads a little small at the same px size */
html[lang="ar"] body { font-size: 16.5px; }
html[lang="ar"] .hero__subtitle { max-width: 44ch; }

/* ---------- 16. Motion preferences ------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn:hover, .card:hover, .project-card:hover { transform: none; }
}
