/* ============================================================
   KALIMA360 — Design tokens
   Palette lifted from the brand's own PDF (isometric cube mark,
   violet #826bf1 / mint #4ade80 on charcoal). Deepened for contrast.
   Display face: Space Grotesk (geometric, squared apertures — echoes
   the cube motif). Body: Poppins (already the brand's set face).
   Utility/eyebrow: IBM Plex Mono (editorial, technical counterpoint).
   ============================================================ */
:root {
  --bg-void: #1c1d22;
  --bg-panel: #26272e;
  --bg-panel-raised: #313340;
  --bg-panel-hi: #3a3c48;

  --violet: #826bf1;
  --violet-glow: #a897ff;
  --violet-deep: #5b44c7;
  --mint: #4ade80;
  --mint-deep: #2ea85c;

  --ink: #f5f5f8;
  --ink-soft: #d6d6de;
  --ink-muted: #9a9aa8;
  --ink-faint: #6c6c78;

  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 255, 255, 0.16);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Poppins", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1360px;
  --edge: clamp(24px, 5vw, 72px);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
}

/* ============================================================
   Reset & base
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

p { color: var(--ink-muted); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
input, textarea {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  font-family: inherit;
}

::selection { background: var(--violet); color: #fff; }

/* Focus visibility — accessibility floor */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  inset-inline-start: -999px;
  top: 0;
  background: var(--mint);
  color: #111;
  padding: 12px 20px;
  z-index: 3000;
  font-weight: 600;
  border-end-end-radius: 8px;
}
.skip-link:focus { inset-inline-start: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Layout utilities
   ============================================================ */
.section { width: 100%; padding: 132px var(--edge) 100px; position: relative; }
.section-tight { padding-top: 96px; padding-bottom: 96px; }
.section-inner { max-width: var(--container); margin: 0 auto; }
.bg-void { background: var(--bg-void); }
.bg-panel { background: var(--bg-panel); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 18px;
}
.eyebrow-icon { margin-inline-end: 2px; }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--mint);
  order: -1;
}
.section-head { max-width: 680px; margin-bottom: 64px; }
.section-head h2 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); margin-bottom: 16px; }
.section-head p { font-size: 1.08rem; max-width: 560px; }
.section-head.centered { max-width: 720px; margin-left: auto; margin-right: auto; text-align: center; }
.section-head.centered .eyebrow::before { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-smooth), background 0.3s, color 0.3s;
  white-space: nowrap;
}
.btn i, .btn svg {
  --icon-flip: 1;
  --icon-move: 0px;
  transform: scaleX(var(--icon-flip)) translateX(var(--icon-move));
  transition: transform 0.3s var(--ease-smooth);
  display: inline-block;
}
.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 12px 30px -10px rgba(130, 107, 241, 0.55); }
.btn-primary:hover { background: var(--mint); color: #10110f; transform: translateY(-3px); box-shadow: 0 16px 34px -10px rgba(74, 222, 128, 0.45); }
.btn-primary:hover i, .btn-primary:hover svg { --icon-move: 4px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-hi); }
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); transform: translateY(-3px); }

/* Signature isometric cube icon — real brand artwork (PNG), used
   everywhere a small cube mark appears: eyebrows, dividers, bullets.
   Replaces the earlier CSS-approximated clip-path version for exact
   fidelity to the brand's actual cube art. */
.cube-icon-img {
  width: 22px; height: auto;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  animation: cubeIconFloat 3.2s ease-in-out infinite;
}
@keyframes cubeIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(3deg); }
}
@media (prefers-reduced-motion: reduce) { .cube-icon-img { animation: none; } }

.bullet-cube-img { width: 16px; height: auto; flex-shrink: 0; margin-top: 3px; }

/* Section dividers */
.divider {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge);
  display: flex;
  align-items: center;
  gap: 24px;
}
.divider .line { flex-grow: 1; height: 1px; background: var(--line); }
.divider .cube-icon-img { animation: dividerBob 4.5s ease-in-out infinite; }
@keyframes dividerBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .divider .cube-icon-img { animation: none; } }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(48px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-fade { opacity: 0; transition: opacity 1s var(--ease-out); }
.reveal-fade.active { opacity: 1; }

/* ============================================================
   Preloader
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-smooth), visibility 0.6s;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo { width: min(264px, 55vw); height: auto; animation: logoBreathe 1.6s ease-in-out infinite; }
@keyframes logoBreathe { 0%, 100% { opacity: 0.55; transform: scale(0.97); } 50% { opacity: 1; transform: scale(1); } }

/* ============================================================
   Navbar
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 26px var(--edge);
  transition: padding 0.4s var(--ease-smooth), background 0.4s var(--ease-smooth), box-shadow 0.4s;
}
#navbar.scrolled {
  padding: 15px var(--edge);
  background: rgba(28, 29, 34, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--line);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: var(--container); margin: 0 auto; }
.logo { display: flex; align-items: center; }
.logo-img { height: 72px; width: auto; display: block; transition: height 0.4s var(--ease-smooth); }
.logo-img.lg { height: 101px; }
#navbar.scrolled .logo-img { height: 55px; }

.nav-right { display: flex; align-items: center; gap: 22px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 100px;
  transition: background 0.3s, color 0.3s;
}
.nav-links a:hover { background: rgba(255,255,255,0.06); color: var(--mint); }

.lang-toggle {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-hi);
  border-radius: 100px;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.3s;
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--mint); }
.lang-toggle .lang-sep { opacity: 0.4; }
.lang-toggle .active { color: var(--mint); font-weight: 600; }

.lang-toggle { position: relative; }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.hamburger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  padding: 26px var(--edge);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 60px; }
.mobile-menu-close { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.06); border: none; color: var(--ink); font-size: 1.15rem; cursor: pointer; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu a { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.lang-toggle-mobile {
  margin-top: 24px; align-self: stretch;
  justify-content: center;
  padding: 13px 12px; font-size: 0.95rem;
}
.mobile-menu .btn-primary {
  margin-top: 32px; align-self: flex-start;
  padding: 11px 22px; font-size: 0.85rem;
}

/* ============================================================
   Hero
   ============================================================ */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 140px var(--edge) 80px;
  perspective: 1200px;
  background:
    radial-gradient(ellipse 900px 500px at 18% 12%, rgba(130,107,241,0.16), transparent 60%),
    radial-gradient(ellipse 800px 500px at 85% 85%, rgba(74,222,128,0.10), transparent 60%),
    var(--bg-void);
}
.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 10%, transparent 75%);
  opacity: 0.5;
}

.hero-3d-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1; }

.hero-inner {
  position: relative; z-index: 10;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-content { max-width: 620px; text-align: left; z-index: 10; position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-hi);
  padding: 8px 18px 8px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
  opacity: 0; animation: fadeUp 0.8s var(--ease-out) 0.1s forwards;
}
.hero-content h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); }
.hero-content h1 .line { display: block; overflow: hidden; }
.hero-content h1 .line span { display: block; transform: translateY(110%); animation: lineUp 1s var(--ease-out) forwards; }
.hero-content h1 .line:nth-child(1) span { animation-delay: 0.25s; }
.hero-content h1 .line:nth-child(2) span { animation-delay: 0.4s; color: var(--violet-glow); }
.hero-content h1 .line:nth-child(3) span { animation-delay: 0.55s; }
@keyframes lineUp { to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.hero-content p {
  font-size: 1.2rem;
  max-width: 560px;
  margin: 28px 0 42px;
  opacity: 0; animation: fadeUp 0.9s var(--ease-out) 0.75s forwards;
}
.hero-actions { display: flex; gap: 16px; justify-content: flex-start; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.9s var(--ease-out) 0.9s forwards; }

/* ---- Hero visual: full-bleed scattered cube field matching the
   company-profile cover artwork. Reuses the proven .cube-icon face
   geometry, scaled up; some cubes are flipped 180° or dimmed to fake
   depth, and edge cubes are cropped by #hero's overflow. ---- */
.hero-visual {
  position: relative;
  height: clamp(440px, 72vh, 660px);
  pointer-events: none;
  opacity: 0; animation: fadeUp 1.1s var(--ease-out) 0.5s forwards;
}
.hero-cube-scene {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 70px, black 130px);
  mask-image: linear-gradient(to bottom, transparent 0, transparent 70px, black 130px);
}

.hcube { position: absolute; opacity: 0; }
.hcube img {
  display: block;
  width: calc(var(--s, 3) * 20px);
  height: auto;
}
.hcube.flip img { transform: scaleX(-1); }
.hcube.dim img { opacity: 0.55; }

.hcube.assembled {
  animation: hcubeIn 1s var(--ease-spring) forwards,
             hcubeFloat var(--dur, 6s) ease-in-out infinite var(--dur, 6s);
}
@keyframes hcubeIn {
  from { opacity: 0; transform: translate3d(var(--fx, 0px), var(--fy, -40px), 0) scale(0.6); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes hcubeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (prefers-reduced-motion: reduce) { .hcube { animation: none !important; opacity: 1; } }
/* stacks under the text on mobile */
@media (max-width: 980px) {
  .hero-visual { width: 100%; height: 400px; max-width: 520px; margin: 0 auto; }
  .hero-cube-scene { opacity: 0.85; }
}

.scroll-cue {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0; animation: fadeUp 0.9s var(--ease-out) 1.1s forwards;
}
.scroll-cue .stick { width: 1px; height: 34px; background: linear-gradient(var(--mint), transparent); animation: scrollStick 1.8s ease-in-out infinite; }
@keyframes scrollStick { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 50.01% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 56px; }
  .hero-content { max-width: 100%; text-align: center; margin: 0 auto; }
  .hero-actions { justify-content: center; }
}

/* ============================================================
   About / Bento
   ============================================================ */
.bento { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 88px; align-items: start; }
.bento-col { display: flex; flex-direction: column; gap: 20px; }
.bento-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s var(--ease-smooth);
}
.bento-card:hover { border-color: var(--line-hi); transform: translateY(-4px); }
.bento-believe { display: flex; flex-direction: column; justify-content: flex-start; }
.bento-believe h3 { font-size: 1.9rem; margin-bottom: 18px; }
.bento-believe p { font-size: 1.08rem; color: var(--ink-soft); }
.bento-quote { margin-top: 28px; font-family: var(--font-display); font-size: 1.5rem; color: var(--mint); font-weight: 600; border-inline-start: 3px solid var(--mint); padding-inline-start: 18px; }

.bento-stat { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; background: linear-gradient(155deg, var(--bg-panel-raised), var(--bg-panel)); }
.bento-stat .num { font-family: var(--font-display); font-size: 4rem; font-weight: 700; color: var(--violet-glow); line-height: 1; }
.bento-stat .lbl { margin-top: 10px; color: var(--ink-muted); font-size: 0.95rem; }

.bento-locations h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin-bottom: 18px; font-family: var(--font-mono); font-weight: 500;}
.loc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.loc-chips span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px; font-size: 0.85rem; }
.loc-chips i { color: var(--mint); font-size: 0.75rem; }

.bento-blend h3 { font-size: 2rem; margin-bottom: 12px; color: var(--mint); }
.bento-blend p { font-size: 1rem; }

@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr; }
}

/* ============================================================
   Motto
   ============================================================ */
.motto-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.motto-copy p { font-size: 1.08rem; margin-bottom: 20px; }
.motto-copy p:last-child { margin-bottom: 0; }
.motto-quote {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  color: var(--mint);
  border-inline-start: 4px solid var(--mint);
  padding-inline-start: 26px;
  line-height: 1.25;
}
@media (max-width: 900px) { .motto-grid { grid-template-columns: 1fr; gap: 30px; } .motto-quote { border-inline-start: none; border-top: 4px solid var(--mint); padding-inline-start: 0; padding-top: 20px; } }

/* ============================================================
   Services
   ============================================================ */
.services-quote {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 0 40px;
}
.services-quote::before, .services-quote::after { color: var(--violet); opacity: 0.6; font-family: Georgia, serif; }
.services-quote::before { content: "\201C"; }
.services-quote::after { content: "\201D"; }
.services-footnote { max-width: 760px; margin: 44px auto 0; text-align: center; color: var(--ink-muted); font-size: 0.95rem; }

.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card {
  padding: 34px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  transition: transform 0.4s var(--ease-smooth), border-color 0.4s, background 0.4s;
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(130,107,241,0.14), rgba(74,222,128,0.10));
  opacity: 0;
  transition: opacity 0.4s;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--line-hi); }
.service-card:hover::after { opacity: 1; }
.service-card i { font-size: 1.4rem; color: var(--mint); margin-bottom: 18px; position: relative; }
.service-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 14px; position: relative; }
.service-card ul { position: relative; display: flex; flex-direction: column; gap: 9px; }
.service-card li { font-size: 0.85rem; color: var(--ink-muted); line-height: 1.4; padding-inline-start: 24px; position: relative; }
.service-card li .bullet-cube-img { position: absolute; inset-inline-start: 0; top: 1px; }
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Methodology
   ============================================================ */
.method-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.method-step { padding: 0 24px; position: relative; }
.method-step:not(:last-child)::after {
  content: "";
  position: absolute; top: 30px; inset-inline-end: -2px; width: 24px; height: 1px;
  background: repeating-linear-gradient(to right, var(--line-hi), var(--line-hi) 4px, transparent 4px, transparent 8px);
}
.method-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 20px; }
.method-step i { font-size: 1.6rem; color: var(--violet-glow); margin-bottom: 18px; display: block; }
.method-step h3 { font-size: 1.25rem; margin-bottom: 12px; letter-spacing: 0.02em; }
.method-step p { font-size: 0.92rem; }
@media (max-width: 900px) {
  .method-row { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .method-step:not(:last-child)::after { display: none; }
}
@media (max-width: 560px) { .method-row { grid-template-columns: 1fr; } }

/* ============================================================
   Purpose / Reason / Methods / Persona
   ============================================================ */
.pillar-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 34px 26px;
  background: var(--bg-panel);
  transition: transform 0.4s var(--ease-smooth), border-color 0.4s;
}
.pillar-card:hover { transform: translateY(-6px); border-color: var(--mint); }
.pillar-card .tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet-glow); margin-bottom: 20px; display: block; }
.pillar-card h3 { font-size: 1.3rem; line-height: 1.25; }
@media (max-width: 900px) { .pillar-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillar-row { grid-template-columns: 1fr; } }

/* ============================================================
   Partners grid
   ============================================================ */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.partner-card {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #f5f5f7;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}
.partner-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -12px rgba(0,0,0,0.5); }
.partner-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s var(--ease-smooth);
}
.partner-card:hover img { transform: scale(1.06); }
.partner-card.partner-hidden { display: none; }

.partners-more-wrap { display: flex; justify-content: center; margin-top: 36px; }
#partnersLoadMore.is-hidden { display: none; }
#partnersLoadMore.is-open i { transform: rotate(180deg); }
#partnersLoadMore i { transition: transform 0.35s var(--ease-smooth); }

@media (max-width: 900px) {
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Success Stories
   ============================================================ */
.stories-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 18px; }
.story-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  border: 1px solid var(--line);
}
.story-card:first-child, .story-card:nth-child(6) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.story-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-smooth); }
.story-card:hover img { transform: scale(1.08); }
.story-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(15,15,18,0.92) 0%, rgba(15,15,18,0.35) 45%, rgba(15,15,18,0.05) 70%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px;
}
.story-card .brand { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.story-card .desc { font-size: 0.84rem; color: var(--ink-soft); margin-bottom: 14px; }
.story-card .tap {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--mint);
}
.story-card .tap i {
  --icon-flip: 1;
  --icon-move: 0px;
  transform: scaleX(var(--icon-flip)) translateX(var(--icon-move));
  transition: transform 0.3s var(--ease-smooth);
  display: inline-block;
}
.story-card:hover .tap i { --icon-move: 4px; }

.story-logo-badge {
  position: absolute; top: 18px; inset-inline-end: 18px; z-index: 2;
  background: #f5f5f7; border-radius: 12px;
  width: 76px; height: 76px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.story-logo-badge img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 1100px) { .stories-grid { grid-template-columns: repeat(2, 1fr); } .story-card:first-child, .story-card:nth-child(6) { grid-column: span 1; grid-row: span 1; aspect-ratio: 3/4; } }
@media (max-width: 560px) { .stories-grid { grid-template-columns: 1fr; } }

/* Drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(10,10,12,0.75); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 1999; opacity: 0; visibility: hidden; transition: 0.4s; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.slide-drawer {
  position: fixed; top: 0; inset-inline-end: 0; width: 100%; max-width: 560px; height: 100vh;
  background: var(--bg-panel); z-index: 2000;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.55s var(--ease-out);
  display: flex; flex-direction: column; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.slide-drawer.open { transform: translateX(0); }
.close-drawer {
  position: absolute; top: 24px; inset-inline-start: 24px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,20,24,0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--line-hi); color: #fff; font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, transform 0.3s;
}
.close-drawer:hover { background: var(--mint); color: #10110f; transform: scale(1.08); }

.drawer-gallery-container { position: relative; background: #101014; flex-shrink: 0; }
.drawer-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.drawer-gallery::-webkit-scrollbar { display: none; }
.drawer-gallery img { width: 100%; height: 400px; object-fit: contain; background: #0a0a0c; scroll-snap-align: start; flex-shrink: 0; }
.gallery-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.gallery-dots span.active { background: var(--mint); width: 18px; border-radius: 3px; transition: 0.3s; }

.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(15,15,18,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, transform 0.3s;
  opacity: 0.8;
}
.gallery-arrow:hover { background: var(--mint); color: #10110f; opacity: 1; }
.gallery-prev { inset-inline-start: 14px; }
.gallery-next { inset-inline-end: 14px; }

.drawer-content { padding: 36px 40px 50px; flex-grow: 1; }
.drawer-content h2 { font-size: 2.5rem; color: var(--mint); display: flex; align-items: center; gap: 14px; }
.drawer-logo { flex-shrink: 0; width: 60px; height: 60px; background: #f5f5f7; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 8px; }
.drawer-logo img { width: 100%; height: 100%; object-fit: contain; }
.drawer-title-text { line-height: 1.15; }
.drawer-divider { height: 3px; width: 46px; background: var(--violet); margin: 20px 0 24px; border-radius: 3px; }
.drawer-body-text { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); }
.drawer-body-text ul { padding-inline-start: 20px; margin-top: 14px; }
.drawer-body-text li { margin-bottom: 10px; list-style: disc; }

.drawer-video { margin-top: 28px; display: none; }
.drawer-video-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.drawer-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   Team band
   ============================================================ */
.team-band {
  background: linear-gradient(120deg, var(--violet-deep), var(--violet) 60%, #6f5be0);
  padding: 100px var(--edge);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.team-band::before, .team-band::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  filter: blur(10px);
}
.team-band::before { top: -100px; left: -80px; }
.team-band::after { bottom: -120px; right: -60px; background: rgba(0,0,0,0.08); }
.team-band h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); color: #fff; margin-bottom: 20px; position: relative; }
.team-band p { max-width: 620px; margin: 0 auto; color: rgba(255,255,255,0.88); font-size: 1.1rem; position: relative; }

/* ============================================================
   Download Company Profile
   ============================================================ */
.download-section {
  position: relative;
  overflow: hidden;
  padding: 120px var(--edge);
  background: #17181d;
}
.download-bg { position: absolute; inset: 0; z-index: 0; }
.download-bg .hero-grid-overlay { opacity: 0.35; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: blobDrift 18s ease-in-out infinite;
}
.blob-a { width: 420px; height: 420px; background: radial-gradient(circle, var(--violet), transparent 70%); top: -120px; left: -80px; animation-duration: 20s; }
.blob-b { width: 380px; height: 380px; background: radial-gradient(circle, var(--mint), transparent 70%); bottom: -140px; right: -60px; animation-duration: 24s; animation-delay: -6s; }
.blob-c { width: 260px; height: 260px; background: radial-gradient(circle, var(--violet-glow), transparent 70%); top: 40%; right: 18%; animation-duration: 16s; animation-delay: -3s; opacity: 0.35; }
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.12); }
  66% { transform: translate(-30px, 25px) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.download-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center;
}
.download-copy h2 { font-size: clamp(2rem, 3.4vw, 2.7rem); margin-bottom: 18px; }
.download-copy p { font-size: 1.08rem; max-width: 480px; margin-bottom: 34px; }
.download-copy .btn { padding: 17px; padding-inline-end: 26px; padding-inline-start: 24px; }
.file-meta {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 100px; margin-inline-start: 4px;
}

.download-visual { display: flex; justify-content: center; perspective: 1000px; }
.download-visual img {
  width: 100%; max-width: 420px; border-radius: 14px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6), 0 0 0 1px var(--line-hi);
  transform: rotate(-3deg);
  transition: transform 0.5s var(--ease-smooth);
}
.download-visual:hover img { transform: rotate(0deg) scale(1.02); }

@media (max-width: 900px) {
  .download-inner { grid-template-columns: 1fr; text-align: center; gap: 44px; }
  .download-copy p { margin-left: auto; margin-right: auto; }
  .download-visual img { max-width: 300px; }
}

/* ============================================================
   Footer / Contact
   ============================================================ */
.footer-section { padding-top: 110px; padding-bottom: 50px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; max-width: var(--container); margin: 0 auto; }
.contact-logo { display: block; margin-bottom: 28px; }
.contact-info .eyebrow { margin-bottom: 18px; }
.contact-info h2 { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: 30px; }
.contact-details a, .contact-details p { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: 1.05rem; color: var(--ink-soft); transition: color 0.3s; }
.contact-details a:hover { color: var(--mint); }
.info-icon { color: var(--violet-glow); width: 20px; text-align: center; flex-shrink: 0; }
.office-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.office-chips span { background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px; font-size: 0.82rem; color: var(--ink-muted); }
.social-icons { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.social-btn { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; transition: 0.3s var(--ease-smooth); }
.social-btn:hover { background: var(--mint); color: #10110f; transform: translateY(-4px); border-color: var(--mint); }

.contact-form-wrapper { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 42px; }
.modern-form .input-group { position: relative; margin-bottom: 30px; }
.modern-form input, .modern-form textarea {
  width: 100%; padding: 14px 0; background: transparent; border: none; border-bottom: 2px solid var(--line-hi);
  color: var(--ink); font-size: 1.05rem; outline: none; transition: border-color 0.3s; font-family: var(--font-body);
  resize: vertical;
}
.input-group label { position: absolute; top: 14px; inset-inline-start: 0; color: var(--ink-muted); font-size: 1.05rem; transition: 0.25s; pointer-events: none; }
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label, .input-group textarea:not(:placeholder-shown) ~ label { top: -16px; font-size: 0.8rem; color: var(--mint); }
.modern-form input:focus, .modern-form textarea:focus { border-bottom-color: var(--mint); }
.form-submit { width: 100%; justify-content: center; margin-top: 6px; }
.form-submit[disabled] { opacity: 0.65; cursor: progress; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }

.captcha-field {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.captcha-question-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.captcha-icon { color: var(--mint); font-size: 0.95rem; flex-shrink: 0; }
.captcha-question-row label { font-size: 0.92rem; color: var(--ink-soft); flex-grow: 1; }
.captcha-refresh {
  background: transparent; border: none; color: var(--ink-muted); cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, color 0.3s, transform 0.4s var(--ease-smooth);
}
.captcha-refresh:hover { background: rgba(255,255,255,0.08); color: var(--mint); }
.captcha-refresh.spinning i { animation: captchaSpin 0.6s linear; }
@keyframes captchaSpin { to { transform: rotate(360deg); } }
.captcha-field input[type="text"] {
  width: 100%; padding: 10px 12px; background: rgba(0,0,0,0.2);
  border: 1px solid var(--line-hi); border-radius: 8px;
  color: var(--ink); font-size: 1rem; outline: none; transition: border-color 0.3s;
  font-family: var(--font-body);
}
.captcha-field input[type="text"]:focus { border-color: var(--mint); }
.form-status { margin-top: 16px; font-size: 0.9rem; padding: 12px 16px; border-radius: 10px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(74,222,128,0.12); color: var(--mint); border: 1px solid rgba(74,222,128,0.3); }
.form-status.err { background: rgba(240,90,90,0.1); color: #ff8c8c; border: 1px solid rgba(240,90,90,0.3); }

.footer-bottom {
  max-width: var(--container); margin: 90px auto 0; padding-top: 30px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  color: var(--ink-faint); font-size: 0.85rem;
}
.footer-bottom .logo, .footer-bottom span:first-child { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-form-wrapper { padding: 30px; }
}

/* ============================================================
   Floating back-to-top
   ============================================================ */
.floating-btn {
  position: fixed; bottom: -70px; inset-inline-end: 28px; width: 52px; height: 52px;
  background: var(--violet); color: #fff; border: none; border-radius: 50%;
  font-size: 1.15rem; cursor: pointer; z-index: 999;
  box-shadow: 0 10px 26px rgba(0,0,0,0.4);
  transition: bottom 0.5s var(--ease-spring), background 0.3s, color 0.3s;
}
.floating-btn.visible { bottom: 28px; }
.floating-btn:hover { background: var(--mint); color: #10110f; }

/* ============================================================
   WhatsApp floating button
   ============================================================ */
.whatsapp-btn {
  position: fixed; bottom: -70px; inset-inline-start: 28px; width: 56px; height: 56px;
  background: #25d366; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; z-index: 999;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  transition: bottom 0.5s var(--ease-spring) 0.15s, transform 0.3s var(--ease-smooth);
}
.whatsapp-btn.visible { bottom: 28px; }
.whatsapp-btn:hover { transform: translateY(-4px) scale(1.06); }
.whatsapp-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #25d366;
  animation: whatsappPulse 2.4s ease-out infinite;
}
@keyframes whatsappPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .whatsapp-ring { animation: none; } }

/* ============================================================
   Ambient cursor glow (desktop only)
   ============================================================ */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 480px; height: 480px;
  border-radius: 50%; pointer-events: none; z-index: 2;
  background: radial-gradient(circle, rgba(130,107,241,0.16), rgba(74,222,128,0.08) 45%, transparent 72%);
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition: opacity 0.4s;
  mix-blend-mode: screen;
  will-change: transform;
}
.cursor-glow.active { opacity: 1; }

/* ============================================================
   Hero ambient particles
   ============================================================ */
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.hero-particle {
  position: absolute;
  bottom: -20px;
  width: var(--sz, 4px); height: var(--sz, 4px);
  border-radius: 50%;
  background: var(--pc, var(--mint));
  opacity: 0;
  animation: particleDrift var(--dur, 14s) linear infinite;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 0 6px currentColor;
}
@keyframes particleDrift {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  8% { opacity: var(--op, 0.6); }
  92% { opacity: var(--op, 0.6); }
  100% { transform: translate3d(var(--drift, 30px), -112vh, 0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-particles { display: none; } }

/* ============================================================
   Tilt (magnetic 3D card hover)
   ============================================================ */
.tilt { transform-style: preserve-3d; transition: transform 0.35s var(--ease-smooth); will-change: transform; }

/* ============================================================
   Magnetic buttons
   ============================================================ */
.magnetic { will-change: transform; }

/* ============================================================
   Count-up number
   ============================================================ */
.count-up { font-variant-numeric: tabular-nums; }

/* ============================================================
   Responsive — navbar collapse
   ============================================================ */
@media (max-width: 980px) {
  .nav-links, .nav-cta, .lang-toggle { display: none; }
  .hamburger { display: flex; }
  .mobile-menu .lang-toggle-mobile { display: flex; }
}
@media (max-width: 640px) {
  .section { padding: 96px var(--edge) 72px; }
  .whatsapp-btn { width: 48px; height: 48px; font-size: 1.35rem; inset-inline-start: 18px; }
  .floating-btn { width: 46px; height: 46px; inset-inline-end: 18px; }
  .download-section { padding: 96px var(--edge) 88px; }
  .cursor-glow { display: none; }
}

/* ============================================================
   RTL / Arabic language mode
   Most of the layout now mirrors automatically via the logical
   properties (inset-inline-*, padding-inline-*, border-inline-*)
   used throughout the file above, so this block only needs to
   handle what logical properties don't cover: font, icon direction,
   slide-in animation direction, and a couple of flex/order details.
   ============================================================ */
html[dir="rtl"] body {
  font-family: "Cairo", var(--font-body);
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .logo-img + *, html[dir="rtl"] .eyebrow, html[dir="rtl"] .btn {
  font-family: "Cairo", var(--font-display);
}
html[dir="rtl"] .hero-eyebrow, html[dir="rtl"] .timeline-hint,
html[dir="rtl"] .lang-toggle, html[dir="rtl"] .file-meta {
  font-family: "Cairo", var(--font-mono);
}

html[dir="rtl"] .hero-content { text-align: right; }
@media (prefers-reduced-motion: no-preference) {
  html[dir="rtl"] .hero-content h1 .line span { transform-origin: right; }
}

/* Mirror directional icons via the --icon-flip variable declared
   alongside .btn i / .btn svg / .story-card .tap i above. */
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-arrow-right-long,
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-paper-plane,
html[dir="rtl"] .fa-arrow-right-from-bracket {
  --icon-flip: -1;
}

/* Reverse hover movement for RTL arrows so they point "forward" */
html[dir="rtl"] .btn-primary:hover i,
html[dir="rtl"] .btn-primary:hover svg,
html[dir="rtl"] .story-card:hover .tap i {
  --icon-move: -4px;
}

/* Flip slide-in menus to come from the left in RTL */
html[dir="rtl"] .mobile-menu,
html[dir="rtl"] .slide-drawer {
  transform: translateX(-100%);
}
html[dir="rtl"] .mobile-menu.open,
html[dir="rtl"] .slide-drawer.open {
  transform: translateX(0);
}

/* Flip drawer box shadow direction */
html[dir="rtl"] .slide-drawer {
  box-shadow: 20px 0 60px rgba(0,0,0,0.5);
}

/* Fix methodology gradient line direction (gradient keywords are
   physical, not logical, so this still needs a manual flip) */
html[dir="rtl"] .method-step:not(:last-child)::after {
  background: repeating-linear-gradient(to left, var(--line-hi), var(--line-hi) 4px, transparent 4px, transparent 8px);
}

/* Mirror the download image tilt */
html[dir="rtl"] .download-visual img {
  transform: rotate(3deg);
}
html[dir="rtl"] .download-visual:hover img {
  transform: rotate(0deg) scale(1.02);
}

/* Remaining details logical properties don't reach: flex order,
   auto-margin centering direction, and explicit chip-row direction. */
html[dir="rtl"] .eyebrow::before { order: 1; }
html[dir="rtl"] .drawer-divider { margin-inline-start: auto; }
html[dir="rtl"] .office-chips, html[dir="rtl"] .loc-chips, html[dir="rtl"] .social-icons {
  direction: rtl;
}

/* ============================================================
   RTL fixes — round 2
   ============================================================ */
/* Letter-spacing breaks Arabic cursive joining — zero it in AR mode */
html[dir="rtl"] body, html[dir="rtl"] body * { letter-spacing: 0 !important; }

/* Case-study drawer must enter from the left in RTL */
html[dir="rtl"] .slide-drawer {
  right: auto; left: 0;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(-100%);
}
html[dir="rtl"] .slide-drawer.open { transform: translateX(0); }

/* Mobile menu enters from the left in RTL */
html[dir="rtl"] .mobile-menu { transform: translateX(-100%); }
html[dir="rtl"] .mobile-menu.open { transform: translateX(0); }

/* Methodology connector between steps */
html[dir="rtl"] .method-step:not(:last-child)::after { right: auto; left: -2px; }

/* Floating form labels + honeypot */
html[dir="rtl"] .input-group label { left: auto; right: 0; }
html[dir="rtl"] .hp-field { left: auto; right: -9999px; }

/* Skip link when focused */
html[dir="rtl"] .skip-link:focus { left: auto; right: 0; }

/* CTA arrows are mirrored in RTL, so the hover nudge goes left */
html[dir="rtl"] .btn-primary:hover i,
html[dir="rtl"] .story-card:hover .tap i { transform: translateX(-4px); }

/* Small physical margins */
html[dir="rtl"] .eyebrow-icon { margin-right: 0; margin-left: 2px; }
html[dir="rtl"] .file-meta { margin-left: 0; margin-right: 4px; }
html[dir="rtl"] .social-icons > span:last-child { margin-left: 0; margin-right: 6px; }

/* Quote accent width consistent with LTR (3px, not 4px) */
html[dir="rtl"] .bento-quote { border-right-width: 3px; }


/* ============================================================
   CMS build — the language toggle is a real link (?lang=xx) here
   instead of a JS button; keep the mobile-menu link styles
   (.mobile-menu a = big display type) from overriding the pill.
   ============================================================ */
a.lang-toggle { text-decoration: none; }
.mobile-menu a.lang-toggle-mobile {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-hi);
}
/* Case-study cards are <a> links in the CMS build (crawlable). */
a.story-card { display: block; color: inherit; }

/* ============================================================
   Hero animation variants — set from admin → Branding & Hero.
   index.php puts data-anim-style / data-anim-intro on #hero and
   --hero-float on it; defaults reproduce the demo4 look exactly.
   ============================================================ */
#hero { --hero-float: 5px; }
@keyframes hcubeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--hero-float) * -1)); } }
@keyframes hcubeDrift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33%      { transform: translate3d(calc(var(--hero-float) * .8), calc(var(--hero-float) * -1), 0) rotate(3deg); }
  66%      { transform: translate3d(calc(var(--hero-float) * -.8), calc(var(--hero-float) * -.4), 0) rotate(-3deg); }
}
@keyframes hcubePulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .75; } }
@keyframes hcubeFadeIn { from { opacity: 0; } to { opacity: 1; } }

#hero[data-anim-style="drift"] .hcube.assembled {
  animation: hcubeIn 1s var(--ease-spring) forwards, hcubeDrift var(--dur, 6s) ease-in-out infinite var(--dur, 6s);
}
#hero[data-anim-style="pulse"] .hcube.assembled {
  animation: hcubeIn 1s var(--ease-spring) forwards, hcubePulse var(--dur, 6s) ease-in-out infinite var(--dur, 6s);
}
#hero[data-anim-style="static"] .hcube.assembled { animation: hcubeIn 1s var(--ease-spring) forwards; }

#hero[data-anim-intro="fade"] .hcube.assembled { animation-name: hcubeFadeIn, hcubeFloat; animation-duration: 1.2s, var(--dur, 6s); }
#hero[data-anim-intro="fade"][data-anim-style="drift"] .hcube.assembled { animation-name: hcubeFadeIn, hcubeDrift; }
#hero[data-anim-intro="fade"][data-anim-style="pulse"] .hcube.assembled { animation-name: hcubeFadeIn, hcubePulse; }
#hero[data-anim-intro="fade"][data-anim-style="static"] .hcube.assembled { animation: hcubeFadeIn 1.2s ease forwards; }
#hero[data-anim-intro="none"] .hcube { opacity: 1; }
#hero[data-anim-intro="none"] .hcube.assembled { animation-name: none, hcubeFloat; }
#hero[data-anim-intro="none"][data-anim-style="drift"] .hcube.assembled { animation-name: none, hcubeDrift; }
#hero[data-anim-intro="none"][data-anim-style="pulse"] .hcube.assembled { animation-name: none, hcubePulse; }
#hero[data-anim-intro="none"][data-anim-style="static"] .hcube.assembled { animation: none; }

/* Custom hero image (replaces the cube field when uploaded) */
.hero-cube-scene.has-custom-image { display: flex; align-items: center; justify-content: center; -webkit-mask-image: none; mask-image: none; }
.hero-custom-img { max-width: 100%; max-height: 100%; object-fit: contain; }
#hero[data-anim-style="float"] .hero-custom-img  { animation: hcubeFloat 6s ease-in-out infinite; --hero-float: 10px; }
#hero[data-anim-style="drift"] .hero-custom-img  { animation: hcubeDrift 9s ease-in-out infinite; }
#hero[data-anim-style="pulse"] .hero-custom-img  { animation: hcubePulse 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .hero-custom-img { animation: none !important; } }

/* ============================================================
   Language switch transition (in-place swap, see script.js §11).
   Content fades/blur-dissolves out, the other language is swapped
   in, then fades back while the hero cubes re-assemble mirrored.
   ============================================================ */
#main, #contact, #navbar .nav-right, #navbar .logo {
  transition: opacity .32s var(--ease-out, ease), filter .32s var(--ease-out, ease);
}
body.lang-switching #main,
body.lang-switching #contact,
body.lang-switching #navbar .nav-right,
body.lang-switching #navbar .logo {
  opacity: 0;
  filter: blur(6px);
}
body.lang-switching { cursor: progress; }
@media (prefers-reduced-motion: reduce) {
  #main, #contact, #navbar .nav-right, #navbar .logo { transition: none; }
  body.lang-switching #main, body.lang-switching #contact { filter: none; }
}

/* Our Team — text spans the full content row (was a narrow 620px column) */
.team-band p {
  max-width: 1240px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.75;
}


/* ================================================================
   ROUND: brand artwork identity pass
   ================================================================ */

/* ---- Hero: the brand cube-cluster artwork, split into 15 cubes ---- */
.hero-cube-scene.pieces {
  inset: auto;
  top: 50%; left: 50%;
  width: min(100%, 620px);
  aspect-ratio: 1136 / 1112;
  transform: translate(-50%, -50%) scale(var(--scene-scale, 1));
  -webkit-mask-image: none; mask-image: none;
}
.hero-cube-scene.pieces.mirrored { transform: translate(-50%, -50%) scale(calc(var(--scene-scale, 1) * -1), var(--scene-scale, 1)); }
.hcube.piece img { width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,0.28)); }
@media (max-width: 980px) {
  .hero-cube-scene.pieces { width: min(92%, 440px); }
}

/* ---- Blueprint grid on every section (same as the hero's) ---- */
.section, .team-band { position: relative; overflow: hidden; isolation: isolate; }
.section::before, .team-band::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 10%, transparent 78%);
  opacity: 0.45;
  top: 0; left: 0; width: auto; height: auto; border-radius: 0; background-color: transparent;
}
.section > .section-inner, .section > .contact-grid, .section > .footer-bottom { position: relative; z-index: 1; }

/* ---- Our Team: same surface as the other sections ---- */
.team-band {
  background: var(--bg-void);
  padding: 132px var(--edge) 110px;
}
.team-band::after { display: none; }
.team-band h2 { color: var(--ink); position: relative; z-index: 1; }
.team-band p { color: var(--ink-soft); position: relative; z-index: 1; }

/* ---- Section identity: brand cube clusters on the section edges ---- */
.section-deco {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  width: clamp(150px, 15vw, 250px);
  height: auto;
  top: 88px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  filter: drop-shadow(0 24px 30px rgba(0,0,0,0.3));
}
.section-deco.in-view { opacity: 0.92; transform: translateY(0); animation: decoFloat 9s ease-in-out 1.2s infinite; }
.section-deco.deco-low { top: auto; bottom: 90px; }
.section-deco.deco-low.in-view { opacity: 0.5; }
@keyframes decoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
/* Keep decor behind text where the side gutter is too narrow */
@media (max-width: 1480px) {
  .section-deco { width: clamp(120px, 12vw, 190px); }
  .section-deco.in-view { opacity: 0.38; }
}
@media (max-width: 760px) {
  .section-deco { width: 110px; top: 40px; }
  .section-deco.in-view { opacity: 0.22; }
}
@media (prefers-reduced-motion: reduce) {
  .section-deco { transition: none; transform: none; }
  .section-deco.in-view { animation: none; }
}

/* ---- Our Strategic Tool: CORE + branches ---- */
.core-diagram {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 1100 / 600;
}
.core-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; overflow: visible; }
.core-img {
  position: absolute;
  left: 25%; top: 13%;
  width: 50%; height: auto;
  z-index: 1;
  opacity: 0;
  transform: scale(0.86) rotate(-3deg);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-spring, var(--ease-out));
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.35));
}
.core-diagram.in-view .core-img { opacity: 1; transform: none; animation: coreFloat 8s ease-in-out 1.4s infinite; }
@keyframes coreFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.core-line {
  fill: none;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s var(--ease-out) calc(0.6s + var(--i) * 0.18s);
}
.core-diagram.in-view .core-line { stroke-dashoffset: 0; }
.core-marker {
  opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0);
  transition: opacity .4s ease calc(1.1s + var(--i) * 0.18s), transform .5s var(--ease-spring, ease) calc(1.1s + var(--i) * 0.18s);
}
.core-diagram.in-view .core-marker { opacity: 1; transform: scale(1); }
.c-mint   { --c: var(--mint); }
.c-violet { --c: var(--violet-glow); }
.c-white  { --c: #f2f2f5; }
.c-grey   { --c: #8f909c; }
.core-line { stroke: var(--c); opacity: .75; }
.core-marker { fill: var(--c); }

.core-branch {
  position: absolute;
  top: var(--y);
  z-index: 3;
  display: flex; flex-direction: column; gap: 4px;
  max-width: 26%;
  opacity: 0; transform: translateY(12px);
  transition: opacity .6s var(--ease-out) calc(1.2s + var(--i) * 0.18s), transform .6s var(--ease-out) calc(1.2s + var(--i) * 0.18s);
}
.core-branch.align-end   { right: calc(100% - var(--x)); text-align: right; align-items: flex-end; }
.core-branch.align-start { left: var(--x); text-align: left; align-items: flex-start; }
.core-diagram.in-view .core-branch { opacity: 1; transform: none; }
.core-tag {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.1rem, 2.1vw, 1.9rem);
  line-height: 1.05;
  color: var(--ink);
}
.core-title { font-size: clamp(0.9rem, 1.35vw, 1.2rem); color: var(--ink-soft); line-height: 1.35; }
.core-branch:hover .core-tag { color: var(--c); }
html[dir="rtl"] .core-tag { font-family: "Cairo", var(--font-display); letter-spacing: 0; }

@media (max-width: 820px) {
  .core-diagram { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .core-lines { display: none; }
  .core-img { position: relative; left: auto; top: auto; width: min(100%, 440px); grid-column: 1 / -1; justify-self: center; }
  .core-branch, .core-branch.align-end, .core-branch.align-start {
    position: relative; left: auto; right: auto; top: auto; max-width: none;
    text-align: start; align-items: flex-start;
    padding-inline-start: 18px; border-inline-start: 3px solid var(--c);
  }
}
@media (prefers-reduced-motion: reduce) {
  .core-img, .core-line, .core-marker, .core-branch { transition: none; }
  .core-diagram.in-view .core-img { animation: none; }
}

/* ---- Partners: three counter-scrolling logo bands ---- */
.logo-bands {
  display: flex; flex-direction: column; gap: 18px;
  margin-inline: calc(var(--edge) * -1);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 9%, black 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 9%, black 91%, transparent);
}
.logo-band { overflow: hidden; direction: ltr; }
.logo-track { display: flex; width: max-content; animation: logoScroll var(--dur, 40s) linear infinite; }
.logo-band.reverse .logo-track { animation-direction: reverse; }
.logo-band:hover .logo-track { animation-play-state: paused; }
.logo-set { display: flex; gap: 18px; padding-inline-end: 18px; margin: 0; list-style: none; }
.logo-tile {
  flex: 0 0 auto;
  width: clamp(150px, 14vw, 210px);
  aspect-ratio: 3 / 2;
  background: #f4f4f7;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.logo-tile img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .78; transition: filter .45s ease, opacity .45s ease, transform .45s var(--ease-out); }
.logo-tile:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 18px 34px -14px rgba(0,0,0,.6), 0 0 0 2px var(--mint); }
.logo-tile:hover img { filter: none; opacity: 1; transform: scale(1.05); }
.logo-band.reverse .logo-tile:hover { transform: translateY(-6px) rotate(1.5deg); box-shadow: 0 18px 34px -14px rgba(0,0,0,.6), 0 0 0 2px var(--violet); }
@keyframes logoScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (hover: none) { .logo-tile img { filter: none; opacity: 1; } }
@media (max-width: 640px) { .logo-bands { gap: 12px; } .logo-set { gap: 12px; padding-inline-end: 12px; } .logo-tile { width: 128px; } }
@media (prefers-reduced-motion: reduce) {
  .logo-bands { margin-inline: 0; -webkit-mask-image: none; mask-image: none; }
  .logo-track { animation: none; width: auto; }
  .logo-set { flex-wrap: wrap; justify-content: center; }
  .logo-set[aria-hidden="true"] { display: none; }
  .logo-tile img { filter: none; opacity: 1; }
}


/* ================================================================
   ROUND: RTL identity + ranked partner board
   ================================================================ */

/* Section identity cubes always sit on the inline-END edge: right in
   English, left in Arabic. In Arabic they are also mirrored so the
   cubes "face" the reading direction. (`scale` is separate from
   `transform`, so the float animation keeps working.) */
/* ---- Strategic tool: CORE word drawn onto the cube face ---- */
.core-img { aspect-ratio: 689 / 555; }
.core-img > img { display: block; width: 100%; height: auto; }
.core-word { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.core-word text {
  fill: #f1f1f4;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 1px;
}
html[dir="rtl"] .core-word text { font-family: "Cairo", var(--font-display); font-size: 31px; letter-spacing: 0; }

/* ---- Partners: ranked network board ---- */
.partner-board {
  position: relative;
  width: 100%;
  max-width: 1240px;
  aspect-ratio: var(--board-aspect, 2);
  margin: 10px auto 0;
}
.board-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; overflow: visible; }
.board-lines path {
  fill: none;
  stroke: rgba(168, 151, 255, 0.28);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s var(--ease-out) calc(0.25s + var(--r) * 0.035s), stroke .3s ease;
}
.partner-board.in-view .board-lines path { stroke-dashoffset: 0; }
.board-lines path.lit { stroke: var(--mint); stroke-width: 2.4; }

.board-core {
  position: absolute; left: 50%;
  width: 17%;
  transform: translate(-50%, -50%) scale(0.7);
  z-index: 1;
  opacity: 0;
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-spring);
}
.board-core img { width: 100%; height: auto; display: block; filter: drop-shadow(0 26px 38px rgba(0,0,0,.45)); }
.partner-board.in-view .board-core { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.partner-board.in-view .board-core img { animation: coreFloat 9s ease-in-out 1.2s infinite; }

.board-tiles { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2; }
.board-tile {
  position: absolute;
  width: var(--tile-w, 7.6%);
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  background: #f6f6f9;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity .5s var(--ease-out) calc(0.15s + var(--r) * 0.035s),
              transform .6s var(--ease-spring) calc(0.15s + var(--r) * 0.035s),
              box-shadow .3s ease;
}
.board-tile img { width: 100%; height: 100%; object-fit: contain; }
.partner-board.in-view .board-tile { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.partner-board.in-view .board-tile.is-top { transform: translate(-50%, -50%) scale(1.08); }
.board-tile:hover, .board-tile.lit {
  transition-delay: 0s;
  z-index: 3;
  box-shadow: 0 18px 36px -12px rgba(0,0,0,.75), 0 0 0 2px var(--mint);
}
.partner-board.in-view .board-tile:hover { transform: translate(-50%, -50%) scale(1.14); }

/* Tablet / phone: ranked grid with the core on top (no wiring) */
@media (max-width: 1023px) {
  .partner-board { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
  .board-lines { display: none; }
  .board-core { position: relative; left: auto; top: auto !important; width: min(46%, 220px); transform: scale(.7); }
  .partner-board.in-view .board-core { transform: none; }
  .board-tiles { position: relative; inset: auto; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .board-tile { position: relative; left: auto !important; top: auto !important; width: auto; transform: scale(.85); }
  .partner-board.in-view .board-tile, .partner-board.in-view .board-tile.is-top, .partner-board.in-view .board-tile:hover { transform: none; }
}
@media (max-width: 560px) { .board-tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (prefers-reduced-motion: reduce) {
  .board-lines path, .board-core, .board-tile { transition: none; }
  .partner-board.in-view .board-core img { animation: none; }
}


/* ================================================================
   ROUND: client feedback (kalima website.pptx)
   ================================================================ */

/* 1. No separator line + cube between sections */
.divider { display: none !important; }

/* 2. Section titles: no cube icon, no green dash. Aligned to the reading
      start: left in English, right in Arabic (text-align:start follows dir). */
.eyebrow::before { display: none !important; }
.eyebrow-icon { display: none !important; }
.section .section-head,
.section .section-head.centered {
  max-width: 760px;
  margin-left: 0 !important; margin-right: 0 !important;
  text-align: start !important;
}
.section .section-head .eyebrow { justify-content: flex-start !important; }
.section .section-head p { margin-left: 0 !important; margin-right: 0 !important; }
.services-quote, .services-footnote { text-align: start !important; margin-left: 0 !important; margin-right: 0 !important; }
/* Our Team: same start alignment */
.team-band { text-align: start; }
.team-band h2, .team-band p { max-width: var(--container); margin-left: auto; margin-right: auto; text-align: start; }

/* 3. Identity clusters alternate sides down the page (like the profile):
      'left' = start edge, 'right' = end edge, so Arabic swaps them. */
.section-deco.deco-right { inset-inline-end: calc(var(--edge) * -0.35); inset-inline-start: auto; }
.section-deco.deco-left  { inset-inline-start: calc(var(--edge) * -0.35); inset-inline-end: auto; }
html[dir="rtl"] .section-deco { scale: -1 1; }
@media (min-width: 1481px) {
  .section-deco.deco-right { inset-inline-end:   max(calc(var(--edge) * -0.35), calc((100% - var(--container)) / 2 - clamp(150px, 15vw, 250px) - 12px)); }
  .section-deco.deco-left  { inset-inline-start: max(calc(var(--edge) * -0.35), calc((100% - var(--container)) / 2 - clamp(150px, 15vw, 250px) - 12px)); }
}

/* 4. Case-study labels: green, all caps, on their own line */
.cs-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 22px 0 6px;
}
.drawer-body-text p:first-child .cs-label { margin-top: 4px; }
html[dir="rtl"] .cs-label { font-family: "Cairo", var(--font-body, sans-serif); font-size: 0.95rem; letter-spacing: 0; }

/* 5. Footer line: soft green glow that fades out at both ends */
.footer-bottom { border-top: 0; position: relative; }
.footer-bottom::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(74,222,128,0.12) 18%, var(--mint) 50%, rgba(74,222,128,0.12) 82%, transparent 100%);
  box-shadow: 0 0 14px 1px rgba(74,222,128,0.35);
}
/* keep the contact cluster clear of the footer line */
/* (contact cluster now hangs under the form, see .contact-deco) */

/* Case-study video: link under the player (opens YouTube/Vimeo if the
   owner has disabled embedding or the visitor prefers the full site) */
.drawer-video-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--mint);
}
.drawer-video-link:hover { color: var(--ink); }
.drawer-video-link .fa-arrow-up-right-from-square { font-size: 0.7rem; opacity: .7; }

/* Contact: small colour cube cluster hanging just under the form, on the
   form's outer edge (right in English, left in Arabic), clear of the
   social icons and above the footer line. */
.contact-form-wrapper { position: relative; }
.contact-deco {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 12px;
  width: clamp(96px, 8vw, 128px);
  height: auto;
  pointer-events: none;
  opacity: .9;
  filter: drop-shadow(0 14px 20px rgba(0,0,0,.35));
  animation: decoFloat 9s ease-in-out infinite;
}
html[dir="rtl"] .contact-deco { scale: -1 1; }
@media (max-width: 900px) { .contact-deco { display: none; } }
@media (prefers-reduced-motion: reduce) { .contact-deco { animation: none; } }

/* "Watch the video" link directly under the case-study title */
.drawer-video-link-wrap:empty { display: none; }
.drawer-video-link-wrap { margin: 6px 0 4px; }
.drawer-video-link-wrap .drawer-video-link { margin-top: 0; }

/* All identity clusters on the END edge (right in English, left in
   Arabic) so they never sit over the start-aligned headings. */
.section-deco.deco-left { inset-inline-start: auto; inset-inline-end: calc(var(--edge) * -0.35); }
@media (min-width: 1481px) {
  .section-deco.deco-left { inset-inline-start: auto; inset-inline-end: max(calc(var(--edge) * -0.35), calc((100% - var(--container)) / 2 - clamp(150px, 15vw, 250px) - 12px)); }
}

/* Why Now: use more of the row, but stop short of the cube cluster */
#why-now .section-head,
#why-now .section-head.centered,
#why-now .services-quote,
#why-now p.section-head {
  max-width: min(1080px, calc(100% - clamp(140px, 17vw, 300px))) !important;
}
#why-now .section-head p { max-width: none !important; }
#why-now .services-quote { margin-top: 10px; }
@media (max-width: 760px) {
  #why-now .section-head, #why-now .services-quote, #why-now p.section-head { max-width: none !important; }
}

/* Quote: only the purple marks (content quotes are stripped in PHP) */
.services-quote::before, .services-quote::after { opacity: 1; color: var(--violet); }

/* Team: keep the paragraphs clear of the cube stack on the end side */
.team-band h2, .team-band p {
  max-width: min(var(--container), calc(100% - clamp(160px, 18vw, 320px))) !important;
  margin-inline-start: max(0px, calc((100% - var(--container)) / 2)) !important;
  margin-inline-end: auto !important;
}
@media (max-width: 760px) {
  .team-band h2, .team-band p { max-width: none !important; margin-inline: 0 !important; }
}

/* Phones: text uses the full width (beats the .centered desktop rule) */
@media (max-width: 760px) {
  #why-now .section-head, #why-now .section-head.centered,
  #why-now .services-quote, #why-now p.section-head { max-width: none !important; }
  .section-deco { width: 110px; opacity: .16 !important; }
  /* Contact: long headline / handle must wrap instead of running off-screen */
  .footer-section h2 { overflow-wrap: anywhere; font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .social-icons { flex-wrap: wrap; }
  .social-icons span { flex-basis: 100%; margin-inline-start: 0 !important; overflow-wrap: anywhere; }
}

/* Who trusts us: heading block centred above the board */
#partners .section-head, #partners .section-head.centered {
  margin-left: auto !important; margin-right: auto !important;
  text-align: center !important;
}
#partners .section-head .eyebrow { justify-content: center !important; }
#partners .section-head p { margin-left: auto !important; margin-right: auto !important; }
#partners .services-footnote { text-align: center !important; margin-left: auto !important; margin-right: auto !important; max-width: 760px; }

/* ---- Footer legal links ---------------------------------------------- */
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; margin-top: 4px; }
.footer-legal a { color: var(--ink-muted); font-size: 0.85rem; text-decoration: none; transition: color .2s; }
.footer-legal a:hover, .footer-legal a:focus-visible { color: var(--mint); }
.footer-legal-sep { color: var(--ink-faint); }

/* ---- Privacy Policy / Terms page (legal.php) ------------------------- */
.legal-page #navbar { position: fixed; }
.legal-main { padding-top: 150px; padding-bottom: 40px; }
.legal-doc { max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }
.legal-doc h1 { font-family: var(--font-display); font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; margin: 14px 0 10px; color: var(--ink); }
.legal-updated { color: var(--ink-faint); font-family: "IBM Plex Mono", monospace; font-size: .85rem; margin-bottom: 36px; }
.legal-body { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.85; }
.legal-body h2 { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); margin: 40px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 16px; padding-inline-start: 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body li::marker { color: var(--mint); }
.legal-body a { color: var(--mint); }
.legal-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.legal-footer .footer-bottom { margin-top: 30px; }
html[dir="rtl"] .legal-doc h1, html[dir="rtl"] .legal-body h2 { font-family: "Cairo", var(--font-display); }
html[dir="rtl"] .legal-body { font-family: "Cairo", var(--font-body, sans-serif); }
.legal-body ul { list-style: none; padding-inline-start: 0; }
.legal-body li { position: relative; padding-inline-start: 22px; }
.legal-body li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .72em; width: 8px; height: 8px; background: var(--mint); transform: rotate(45deg); border-radius: 1px; }

/* Who we are: same text size + grey as "Our Position" */
.bento-believe p { font-size: 1rem; color: var(--ink-muted); }
/* Our Team title in brand green */
.team-band h2 { color: var(--mint) !important; }