/* Case studies index v3: a dark, cinematic work list. Two card types in rhythm:
   full (image-led banner, text over it) and pair (two tall cards, image fading into navy).
   Each card's results sit inside its image. */
.cx-list { --navy: #050f2b; --navy-2: #0a1a40; --txt: rgb(255 255 255 / 74%); --rule: rgb(255 255 255 / 28%);
  background: radial-gradient(1200px 600px at 85% 640px, rgb(43 116 232 / 16%), transparent 60%), radial-gradient(900px 700px at 0% 55%, rgb(43 116 232 / 10%), transparent 60%), var(--navy); color: #fff; }
.section.cx-list { padding-top: clamp(72px, 8vw, 120px); }
.cx-grid { display: flex; flex-direction: column; gap: clamp(28px, 3.4vw, 48px); }

.cv-card.cx { position: relative; display: block; overflow: hidden; border: 0; border-radius: 28px; background: transparent; color: #fff; isolation: isolate; box-shadow: none; transform: none; }
.cv-card.cx:hover { color: #fff; transform: none; box-shadow: none; }
.cx-media { position: relative; overflow: hidden; background: var(--navy-2); }
.cx-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.cx:hover .cx-media img { transform: scale(1.035); }

.cx-body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cx-client { margin: 0; font-size: clamp(30px, 3vw, 44px); font-weight: 700; line-height: 1; letter-spacing: -.03em; color: #fff; }
/* Name, then a short description: up to three lines on the big cards, two on the vertical ones. */
.cx-text { display: -webkit-box; margin: 0; max-width: 480px; overflow: hidden; font-size: 16px; line-height: 1.6; color: var(--txt); text-wrap: pretty; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.cx--pair .cx-text { -webkit-line-clamp: 2; line-clamp: 2; }

/* Results: a small row inside the image, value over label, divided like the reference.
   On paired cards it fades in over the top of the image on hover (always shown
   on touch screens); on full banners it sits bottom-right, like a poster credit. */
.cx-facts { position: absolute; top: clamp(18px, 2vw, 26px); left: clamp(20px, 2.4vw, 32px); z-index: 2; display: flex; margin: 0; opacity: 0; transform: translateY(-6px); transition: opacity .35s ease, transform .35s ease; }
.cx-facts div { padding: 0 clamp(14px, 1.4vw, 20px); border-left: 1px solid var(--rule); }
.cx-facts div:first-child { padding-left: 0; border-left: 0; }
.cx-facts dt { font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; color: #fff; }
.cx-facts dd { margin: 4px 0 0; font-size: 12.5px; line-height: 1.3; white-space: nowrap; color: rgb(255 255 255 / 80%); }
.cx-media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgb(5 15 43 / 82%) 0%, rgb(5 15 43 / 35%) 30%, transparent 55%); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.cx:hover .cx-facts, .cx:focus-visible .cx-facts { opacity: 1; transform: none; }
.cx:hover .cx-media::before, .cx:focus-visible .cx-media::before { opacity: 1; }

/* The site's own gold button (components.css); hovering anywhere on the card plays its hover. */
.cx-go { align-self: flex-start; margin-top: 10px; }
.cx:hover .btn.cx-go { background: var(--white); transform: translateY(-2px); }

/* full: banner, text over the image, results bottom-right */
.cv-card.cx--full { display: flex; }
.cv-card.cx--pair { display: flex; background: var(--navy-2); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%); }
.cx--full { min-height: clamp(520px, 44vw, 640px); display: flex; flex-direction: column; justify-content: flex-end; }
.cx--full .cx-media { position: absolute; inset: 0; z-index: -1; }
.cx--full .cx-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(5 15 43 / 92%) 0%, rgb(5 15 43 / 70%) 38%, rgb(5 15 43 / 0%) 72%), linear-gradient(0deg, rgb(5 15 43 / 85%) 0%, transparent 45%); }
.cx--full .cx-media::before { opacity: 1; background: radial-gradient(60% 45% at 100% 100%, rgb(5 15 43 / 80%), transparent 75%); }
.cx--full .cx-facts { top: auto; right: clamp(40px, 5.5vw, 88px); bottom: clamp(40px, 5.5vw, 88px); left: auto; opacity: 1; transform: none; }
.cx--full .cx-body { width: 100%; padding: clamp(40px, 5.5vw, 88px); }

/* full, text on the right: for scenes whose empty side is the right; the navy wash and the
   results swap sides. --focus keeps the screens in view when the image is cropped. */
.cx--full .cx-media img { object-position: var(--focus, 50%) 50%; }
.cx--right .cx-media::after { background: linear-gradient(270deg, rgb(5 15 43 / 92%) 0%, rgb(5 15 43 / 70%) 38%, rgb(5 15 43 / 0%) 72%), linear-gradient(0deg, rgb(5 15 43 / 85%) 0%, transparent 45%); }
.cx--right .cx-media::before { background: radial-gradient(60% 45% at 0% 100%, rgb(5 15 43 / 80%), transparent 75%); }
.cx--right .cx-facts { right: auto; left: clamp(40px, 5.5vw, 88px); }
.cx--right .cx-body { width: auto; margin-left: auto; }
/* When the scene reaches into the bottom corner, the results sit lower, under it. */
.cx--facts-low .cx-facts { bottom: clamp(20px, 2.4vw, 34px); }

/* pair: two tall cards, image fades into navy */
.cx-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.cx--pair { display: flex; flex-direction: column; background: var(--navy-2); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%); }
.cx--pair .cx-media { aspect-ratio: 16 / 11; }
.cx--pair .cx-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--navy-2) 0%, rgb(10 26 64 / 0%) 45%); }
.cx--pair .cx-body { flex: 1; margin-top: -48px; padding: 0 clamp(24px, 2.6vw, 40px) clamp(28px, 3vw, 40px); position: relative; }
.cx--pair .cx-client { font-size: clamp(26px, 2.4vw, 36px); }
/* Paired cards use the site's text link (case-cards.css), white on the dark card. */
.cx--pair .cx-go { margin-top: auto; padding-top: 18px; color: #fff; }
.cx--pair:hover .cx-go { color: #7fb0ff; }

/* bands sit inside the dark list */
.cx-grid .cv-band { margin: 0; }
.cx-grid .cv-band--blue { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%); }

/* No hover on touch screens: results always show. */
@media (hover: none) {
  .cx-facts { opacity: 1; transform: none; }
}
@media (max-width: 1000px) {
  /* Narrow cards: the three results share the image width and may wrap, never spill past it. */
  .cx-media .cx-facts { right: 18px; left: 18px; }
  .cx-facts div { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  .cx-facts dt, .cx-facts dd { white-space: normal; }
  .cx--full .cx-media::after { background: linear-gradient(0deg, rgb(5 15 43 / 96%) 0%, rgb(5 15 43 / 75%) 50%, rgb(5 15 43 / 10%) 100%); }
  .cx--full .cx-facts { top: clamp(18px, 2vw, 26px); right: auto; bottom: auto; left: clamp(20px, 2.4vw, 32px); }
  .cx--full .cx-media::before { background: linear-gradient(180deg, rgb(5 15 43 / 82%) 0%, rgb(5 15 43 / 35%) 30%, transparent 55%); }
  .cx--right .cx-body { width: 100%; margin-left: 0; }
}
@media (max-width: 720px) {
  .cx-pair { grid-template-columns: minmax(0, 1fr); }
  .cx { border-radius: 20px; }
  .cv-card.cx--full { background: var(--navy-2); }
  .cx--full { display: flex; flex-direction: column; min-height: 0; background: var(--navy-2); }
  .cx--full .cx-media { position: relative; aspect-ratio: 16 / 11; z-index: 0; }
  .cx--full .cx-media::after { background: linear-gradient(0deg, var(--navy-2) 0%, transparent 45%); }
  .cx--full .cx-body { margin-top: -40px; padding: 0 24px 28px; position: relative; }
  .cx-facts dt { font-size: 15px; }
  .cx-facts dd { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .cx-media img, .cx-facts, .cx-media::before { transition: none; } }

/* featured Mashreq card: the supplied render (1824x788, baked copy painted out) is the card; live copy sits where the reference has it.
   Sizes in cqw so the layout scales exactly with the image. */
.cv-card.cx--feat { position: relative; display: block; container-type: inline-size; background: #061533; overflow: hidden; border-radius: 28px; aspect-ratio: 2520 / 1082; }
.cx--feat .cx-feat__art { position: absolute; inset: 0; }
.cx--feat .cx-feat__art img { display: block; width: 100%; height: 100%; }
.cx--feat .cx-feat__body { position: absolute; left: 58.7%; right: 2.6%; top: 50%; transform: translateY(-50%); display: grid; justify-items: start; }
.cx--feat .cx-client { margin: 0 0 1.4cqw; font-size: 4.4cqw; line-height: 1.02; letter-spacing: -0.015em; color: #fff; }
.cx--feat .cx-text { margin: 0 0 3.2cqw; max-width: 36cqw; font-size: 1.32cqw; line-height: 1.55; color: rgb(255 255 255 / 85%); }
.cx-feat__stats { margin: 2.6cqw 0 3cqw; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5cqw; }
.cx-feat__stats div { display: grid; align-content: start; grid-template-rows: auto 1fr auto; min-height: 9.1cqw; padding: 1.1cqw 1.8cqw 1.1cqw; border: 1px solid rgb(255 255 255 / 18%); border-radius: 1cqw; background: rgb(255 255 255 / 3%); }
.cx-feat__ic { display: block; width: 1.7cqw; height: 1.7cqw; margin-bottom: 0.9cqw; color: #fff; }
.cx-feat__ic.is-gold { color: #f5b52e; }
.cx-feat__ic svg { display: block; width: 100%; height: 100%; }
.cx-feat__stats dt { align-self: end; font-weight: 700; font-size: 2.3cqw; line-height: 1; color: #f5b52e; }
.cx-feat__stats dd { margin: 0.5cqw 0 0; font-size: 0.95cqw; line-height: 1.25; color: #fff; }
.cx-feat__stats .is-text dt, .cx-feat__stats .is-text dd { font-size: 1.2cqw; line-height: 1.2; font-weight: 700; color: #fff; }
.cx-feat__stats .is-text dd { margin-top: 0; }
.cx-feat__stats .is-hot { border-color: #f08a24; background: linear-gradient(160deg, rgb(240 138 36 / 30%), rgb(240 138 36 / 6%)); }
.cx-feat__stats .is-hot dt { color: #6fe36a; }
@media (max-width: 900px) {
  .cv-card.cx--feat { aspect-ratio: auto; container-type: normal; border-radius: 20px; }
  .cx--feat .cx-feat__art { position: relative; aspect-ratio: 1460 / 1082; overflow: hidden; }
  .cx--feat .cx-feat__art img { width: 172%; height: auto; max-width: none; }
  .cx--feat .cx-feat__body { position: static; transform: none; padding: 8px 24px 28px; }
  .cx--feat .cx-client { font-size: clamp(32px, 8vw, 48px); margin-bottom: 12px; }
  .cx--feat .cx-text { font-size: 16px; max-width: none; margin-bottom: 24px; }
  .cx-feat__stats { margin: 20px 0 24px; gap: 10px; }
  .cx-feat__stats div { min-height: 0; padding: 14px; border-radius: 12px; }
  .cx-feat__ic { width: 20px; height: 20px; margin-bottom: 10px; }
  .cx-feat__stats dt { font-size: 24px; } .cx-feat__stats dd { font-size: 13px; margin-top: 4px; }
  .cx-feat__stats .is-text dt, .cx-feat__stats .is-text dd { font-size: 15px; }
}
@media (max-width: 520px) { .cx-feat__stats { grid-template-columns: minmax(0, 1fr); } }

/* TIG card: dark wave banner shown whole at its own shape (1796x876); its left side is already dark, so no navy wash */
.cx--tig .cx-media { background: #04163a; }
.cx--tig .cx-media img { -webkit-mask-image: none; mask-image: none; }
@media (min-width: 1200px) {
  .cx--full.cx--tig { min-height: 0; aspect-ratio: 1796 / 876; justify-content: center; }
  .cx--tig .cx-media img { object-fit: contain; }
  .cx--tig .cx-media::after, .cx--tig .cx-media::before { display: none; }
  .cx--tig .cx-body { width: 42%; padding-block: clamp(24px, 3vw, 56px); }
  .cx--tig .cx-facts { bottom: clamp(16px, 2vw, 28px); }
}
/* Lyfex card: dreamscape banner (1981x794) shown whole; scene fills the left, copy sits on the open sky at right */
.cx--lyfex .cx-media { background: #1d2a6b; }
.cx--lyfex .cx-media img { -webkit-mask-image: none; mask-image: none; }
@media (min-width: 1001px) {
  .cx--full.cx--lyfex { min-height: 0; aspect-ratio: 1981 / 794; justify-content: center; }
  .cx--lyfex .cx-media img { object-fit: contain; }
  .cx--lyfex .cx-media::before { display: none; }
  .cx--lyfex .cx-media::after { background: linear-gradient(270deg, rgb(5 15 43 / 78%) 0%, rgb(5 15 43 / 45%) 30%, rgb(5 15 43 / 0%) 50%); }
  .cx--lyfex .cx-body { width: 40%; padding-block: clamp(24px, 3vw, 56px); }
  .cx--lyfex .cx-facts { bottom: clamp(16px, 2vw, 28px); }
}

/* Omantel card: no navy wash over the render; laptop nudged 100px left */
@media (min-width: 1001px) {
  .cx--omantel .cx-media::after, .cx--omantel .cx-media::before { display: none; }
  .cx--omantel .cx-media img { object-position: calc(var(--focus, 50%) - 100px) 50%; }
}

/* Chargezoom card: banner (1890x832) shown whole, no navy wash */
.cx--chargezoom .cx-media { background: #3a5cb8; }
@media (min-width: 1001px) {
  .cx--full.cx--chargezoom { min-height: 0; aspect-ratio: 1890 / 832; justify-content: center; }
  .cx--chargezoom .cx-media::after, .cx--chargezoom .cx-media::before { display: none; }
  .cx--chargezoom .cx-body { width: 42%; padding-block: clamp(24px, 3vw, 56px); }
  .cx--chargezoom .cx-facts { bottom: clamp(16px, 2vw, 28px); }
}

/* ESG card: banner (4378x1904) shown whole, no navy wash; copy on the open sky at right, results top-right */
.cx--esg .cx-media { background: #123a86; }
@media (min-width: 1001px) {
  .cx--full.cx--esg { min-height: 0; aspect-ratio: 4378 / 1640; justify-content: center; }
  .cx--esg .cx-media img { object-position: 50% 100%; }
  .cx--esg .cx-media::after, .cx--esg .cx-media::before { display: none; }
  .cx--esg .cx-body { width: 40%; padding-block: clamp(24px, 3vw, 56px); }
  .cx--esg .cx-facts { top: clamp(20px, 2.4vw, 36px); bottom: auto; right: auto; left: calc(60% + clamp(40px, 5.5vw, 88px)); }
}

/* Selectr pair card: graphic shown whole at its own shape (6966x4624) */
.cx--selectr .cx-media { background: #c9d6f2; }
.cx--pair.cx--selectr .cx-media { aspect-ratio: 6966 / 4624; }

/* Momnt card: phones-on-podium banner (7808x4118) shown whole, no navy wash; copy on the dark left side */
.cx--momnt .cx-media { background: #0a1a40; }
.cx--momnt .cx-media img { -webkit-mask-image: none; mask-image: none; }
@media (min-width: 1001px) {
  .cx--full.cx--momnt { min-height: 0; aspect-ratio: 7808 / 4118; justify-content: center; }
  .cx--momnt .cx-media::after, .cx--momnt .cx-media::before { display: none; }
  .cx--momnt .cx-body { width: 32%; padding-block: clamp(24px, 3vw, 56px); }
}

.cv-card.cx--momnt { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%); }
.cv-card.cx--momnt::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%); pointer-events: none; }
