/* Clients page.  Markup: website/clients.xml (Bootstrap grid)   Shared parts: navbar.css, footer.css */
:root {
  --cl-navy: #0A2540;
  --cl-teal: #00D1B2;
  --cl-cyan: #00C2FF;
  --cl-bg: #f1f6fb;
  --cl-ease: cubic-bezier(.22, 1, .36, 1);
  --d: 0s;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body {
  margin: 0;
  background: var(--cl-bg);
  color: var(--cl-navy);
  font-family: 'Montserrat', 'Cairo', system-ui, sans-serif;
}

html[data-lang="ar"] body {
  font-family: 'Cairo', 'Montserrat', system-ui, sans-serif;
}

img {
  max-width: 100%;
}

/* ---------- hero: starry sky, giant title behind, glowing globe rising from the bottom ---------- */
.clients-hero {
  --gfs: clamp(4rem, 17vw, 15rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background: #050a14;
  min-height: clamp(520px, 41vw, 760px);
  padding: clamp(1.5rem, 4vh, 3rem) 16px 0;
}

html[data-lang="ar"] .clients-hero {
  --gfs: clamp(3.8rem, 16vw, 13rem);
}

.clients-hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -3;
  background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .1)), url(../src/opt/clients-bg.webp) center / cover no-repeat;   /* the 10% black is the old brightness(.9): a filter on this layer would be redone on every breathing frame */
}

/* slow "breathing": a light veil fades in and out. Animating opacity is cheap; animating filter on this full-size layer repainted it every frame. */
.clients-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .1);
  opacity: 0;
  animation: clients-breath 16s ease-in-out infinite alternate;
}

/* drifting clouds + network canvas, between the sky and the title */
.clients-hero__clouds {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  direction: ltr;
}

.clients-hero__cloud {
  position: absolute;
  width: 55vw;
  height: 14vw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.17), transparent);
  animation: clients-drift linear infinite;
}

.clients-hero__cloud:nth-child(1) {
  top: 6%;
  left: -30%;
  animation-duration: 70s;
}

.clients-hero__cloud:nth-child(2) {
  top: 20%;
  left: -50%;
  animation-duration: 95s;
  animation-delay: -30s;
  opacity: .8;
}

.clients-hero__cloud:nth-child(3) {
  top: 34%;
  left: -20%;
  animation-duration: 120s;
  animation-delay: -60s;
  opacity: .6;
}

@keyframes clients-drift {
  to {
    transform: translateX(190vw);
  }
}

@keyframes clients-breath {
  to {
    opacity: 1;
  }
}

.clients-hero__giant {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: .22em;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  font-size: var(--gfs);
  line-height: .9;
  letter-spacing: .06em;
  white-space: nowrap;
  text-transform: uppercase;
  user-select: none;
}

html[data-lang="ar"] .clients-hero__giant {
  margin-top: 1px;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
}

.clients-word {
  display: inline-flex;
  overflow: hidden;
  padding-top: .04em;
}

html[data-lang="ar"] .clients-word {
  padding: .12em .06em .3em;
}

.clients-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.78) 45%, rgba(0,194,255,.3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: clients-char 1.3s var(--cl-ease) forwards;
  animation-delay: calc(.25s + var(--i) * .07s);
}

@keyframes clients-char {
  to {
    opacity: 1;
    transform: none;
  }
}

/* the globe picture is a transparent PNG (webp with alpha), so it sits directly on the sky */
.clients-hero__globe {
  --gw: min(1350px, 150%);
  position: absolute;
  z-index: 2;
  left: 50%;
  width: var(--gw);
  margin-left: calc(var(--gw) / -2);
  pointer-events: none;
  animation: clients-rise 2.2s cubic-bezier(.16, 1, .3, 1) .35s both;
}

.clients-hero__globe img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes clients-rise {
  from {
    transform: translateY(60%);
    opacity: 0;
  }
}

/* bottom edge fades into the page */
.clients-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(0deg, #1f4054, transparent);
}

@media (max-width: 991.98px) {
  .clients-hero {
    min-height: clamp(440px, 72vw, 620px);
  }

  .clients-hero__globe {
    bottom: -4%;
  }
}

@media (max-width: 575.98px) {
  .clients-hero {
    --gfs: clamp(3.6rem, 21vw, 7rem);
    min-height: 440px;
  }

  html[data-lang="ar"] .clients-hero {
    --gfs: clamp(3.6rem, 21vw, 6.5rem);
  }

  .clients-hero__globe {
    --gw: 210%;
    bottom: -2%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clients-hero__bg,
  .clients-char,
  .clients-hero__globe,
  .clients-hero__cloud {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .clients-char {
    -webkit-text-fill-color: transparent;
  }
}

/* ---------- logo cards ---------- */
.clients-main {
  background: #f0fdfa;
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.clients-card {
  position: relative;
  height: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: .9rem 1.1rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: none;
  transition: transform .45s var(--cl-ease), box-shadow .45s var(--cl-ease);
}

.clients-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cl-cyan), var(--cl-teal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--cl-ease);
}

html[dir="rtl"] .clients-card::after {
  transform-origin: right;
}

.clients-card:hover {
  transform: translateY(-6px);
  box-shadow: none;
}

.clients-card:hover::after {
  transform: scaleX(1);
}

.clients-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 92px;
  object-fit: contain;
  transition: transform .6s var(--cl-ease);
}

.clients-card:hover img {
  transform: scale(1.06);
}

/* logos fade up one after another (only when the script has switched it on) */
.clients-ready .clients-card {
  opacity: 0;
  transform: translateY(30px);
}

.clients-ready .clients-card.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--cl-ease) var(--d), transform .9s var(--cl-ease) var(--d), box-shadow .45s var(--cl-ease);
}

.clients-ready .clients-card.is-in:hover {
  transform: translateY(-6px);
  transition-delay: 0s;
}

/* ---------- decorative squares, spread over the page (sizes and colours come from the site palette) ---------- */
.clients-hero {
  overflow: hidden;
}

.clients-tile {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
  width: var(--s, 16px);
  height: var(--s, 16px);
  border-radius: 26%;
  animation: clients-sq-float 7s ease-in-out var(--sd, 0s) infinite alternate;
}

.clients-tile--xs {
  --s: 10px;
}

.clients-tile--sm {
  --s: 16px;
}

.clients-tile--md {
  --s: 28px;
}

.clients-tile--lg {
  --s: 44px;
}

.clients-tile--xl {
  --s: 68px;
}

.clients-tile--cyan {
  background: var(--cl-cyan);
  opacity: .75;
}

.clients-tile--blue {
  background: #0066FF;
  opacity: .5;
}

.clients-tile--navy {
  background: var(--cl-navy);
  opacity: .09;
}

.clients-hero .clients-tile--navy {
  background: #fff;
  opacity: .08;
}

.clients-tile--ghost {
  background: transparent;
  border: 2px solid var(--cl-teal);
  opacity: .55;
}

@keyframes clients-sq-float {
  from {
    transform: translateY(0) rotate(0deg);
  }

  to {
    transform: translateY(-14px) rotate(8deg);
  }
}

@media (max-width: 767.98px) {
  .clients-tile--xl {
    --s: 44px;
  }

  .clients-tile--lg {
    --s: 30px;
  }

  .clients-tile--md {
    --s: 20px;
  }
}

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

/* ---------- cursor light: a soft glow follows the mouse over the hero and the logos; each card also lights up under the pointer ---------- */
.clients-hero,
.clients-main {
  position: relative;
}

.clients-main {
  isolation: isolate;
  overflow: hidden;
}

.clients-spot {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
  background: radial-gradient(circle 280px at var(--mx, 50%) var(--my, 50%), rgba(0,209,178,.26), rgba(0,194,255,.12) 45%, transparent 72%);
}

.clients-hero .clients-spot {
  background: radial-gradient(circle 320px at var(--mx, 50%) var(--my, 50%), rgba(0,194,255,.38), rgba(0,209,178,.16) 45%, transparent 72%);
}

.is-lit > .clients-spot {
  opacity: 1;
}

.clients-main > .clients-spot,
.clients-card::before {
  display: none;
}

/* no glow behind or inside the logo cards */
.clients-hero .container,
.clients-main .container {
  position: relative;
  z-index: 1;
}

.clients-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(circle 150px at var(--cx, 50%) var(--cy, 50%), rgba(0,209,178,.22), transparent 70%);
}

@media (hover: none) {
  .clients-spot,
  .clients-card::before {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .sec-sub {
    letter-spacing: .2em;
    font-size: .75rem;
  }

  .sec-head {
    padding-inline: 1rem;
  }

  .sec-h {
    overflow-wrap: anywhere;
  }

  .clients-card {
    min-height: 96px;
    border-radius: 14px;
    padding: .6rem .7rem;
  }

  .clients-card img {
    max-height: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clients-card,
  .clients-card img,
  .clients-card::after {
    transition: none;
  }
}

/* phones: the globe sits lower so the subtitle stays on clear sky */
@media (max-width: 575.98px) {
  /*.clients-hero-sub { text-shadow: 0 2px 12px rgba(0,0,0,.8); }*/
  .clients-hero__globe {
    bottom: -2%;
  }
}

/* ---------- responsive hero: title centred between the (transparent) navbar and the globe ---------- */
@media (max-width: 1199.98px) {
  .clients-hero__giant,
  html[data-lang="ar"] .clients-hero__giant {
    margin-top: calc(var(--atd-nav-h, 57px) + 1rem);
  }
}

@media (max-width: 991.98px) {
  .clients-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(460px, 72vw, 620px);
    padding: calc(var(--atd-nav-h, 57px) + 1rem) 16px clamp(150px, 40vw, 250px);
  }

  .clients-hero__giant,
  html[data-lang="ar"] .clients-hero__giant {
    margin: 0;
  }

  .clients-hero__globe {
    --gw: min(1100px, 170%);
  }
}

@media (max-width: 767.98px) {
  .clients-hero {
    --gfs: clamp(3.4rem, 17vw, 8rem);
    min-height: clamp(430px, 92vw, 560px);
  }

  html[data-lang="ar"] .clients-hero {
    --gfs: clamp(3.4rem, 16vw, 7.5rem);
  }
}

@media (max-width: 575.98px) {
  .clients-hero {
    --gfs: clamp(3rem, 19vw, 5.5rem);
    min-height: clamp(400px, 112vw, 470px);
  }

  html[data-lang="ar"] .clients-hero {
    --gfs: clamp(3rem, 18vw, 5.2rem);
  }

  .clients-hero__giant {
    letter-spacing: .03em;
    gap: .18em;
  }

  html[data-lang="ar"] .clients-hero__giant {
    letter-spacing: 0;
  }

  .clients-hero__globe {
    --gw: 210%;
  }
}

@media (max-width: 359.98px) {
  .clients-hero {
    min-height: 390px;
  }
}

/* short landscape screens: do not let the hero be taller than the viewport */
@media (max-height: 520px) and (orientation: landscape) {
  .clients-hero {
    min-height: 0;
    padding-bottom: 3rem;
  }
}

/* ---------- hero background fixed behind the whole page; logo cards sit on it ---------- */
:root {
  --cl-sky: #0a2540;
}

/* page colour behind the globe: change this one value */
body {
  background: var(--cl-sky);
}

.clients-hero {
  background: transparent;
}

.clients-hero__bg {
  position: fixed;
  z-index: -1;
  background-color: var(--cl-sky);
  background-blend-mode: lighten;
  background-position: center bottom;
}

.clients-hero::after {
  content: none;
}

.clients-main {
}

.clients-tile--navy {
  background: #fff;
  opacity: .08;
}

/* the globe is cut by the hero's bottom edge: fade its last part out so it melts into the page background */
.clients-hero__globe {
  bottom: 0 !important;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - clamp(90px, 14vw, 220px)), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - clamp(90px, 14vw, 220px)), transparent 100%);
}
