/* Keep the campaign in its own plane and the channel marks out of the copy. */
.kv-home > .kv-gallery-home {
  --platform-art: url('/assets/img/agency-hero/full-service-en.webp');
  --platform-crop: 2090%;
  --platform-meta: 59.30% 93.03%;
  --platform-google: 65.77% 93.73%;
  --platform-tiktok: 72.49% 94.08%;
  --platform-youtube: 79.52% 94.66%;
  --platform-size: clamp(36px, 3vw, 46px);
}

html[lang='bn'] .kv-home > .kv-gallery-home {
  --platform-art: url('/assets/img/agency-hero/full-service-bn.webp');
  --platform-crop: 2350%;
  --platform-meta: 46.04% 94.89%;
  --platform-google: 58.23% 94.77%;
  --platform-tiktok: 82.60% 94.89%;
  --platform-youtube: 70.48% 94.77%;
}

.kv-hero-platforms {
  position: absolute;
  z-index: 0;
  right: max(24px, calc((100vw - 1240px) / 2));
  bottom: clamp(16px, 2.25vw, 36px);
  display: flex;
  gap: 8px;
}

.kv-hero-platforms > span {
  width: var(--platform-size);
  aspect-ratio: 1;
  border: 1px solid #fff;
  border-radius: 10px;
  background: #fff var(--platform-art) no-repeat;
  background-size: var(--platform-crop) auto;
  box-shadow: 0 5px 18px #26385324;
}

.kv-hero-platforms > .kv-platform-meta { background-position: var(--platform-meta); }
.kv-hero-platforms > .kv-platform-google { background-position: var(--platform-google); }
.kv-hero-platforms > .kv-platform-tiktok { background-position: var(--platform-tiktok); }
.kv-hero-platforms > .kv-platform-youtube { background-position: var(--platform-youtube); }

@media (min-width: 861px) {
  .kv-gallery-home .hero-service-backdrop { inset-inline-start: 17%; }
  .kv-gallery-home .hero-service-backdrop img {
    object-fit: cover;
    object-position: right center;
  }
  .kv-home > .kv-gallery-home::before {
    background:
      linear-gradient(90deg, var(--hero-paper) 0 20%, var(--hero-paper) 26%,
        color-mix(in srgb, var(--hero-paper) 91%, transparent) 34%, transparent 60%),
      linear-gradient(0deg, var(--hero-paper), transparent 17%);
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .kv-home > .kv-gallery-home::before {
    background:
      linear-gradient(90deg, var(--hero-paper) 0 36%,
        color-mix(in srgb, var(--hero-paper) 94%, transparent) 42%,
        color-mix(in srgb, var(--hero-paper) 84%, transparent) 49%, transparent 66%),
      linear-gradient(0deg, var(--hero-paper), transparent 17%);
  }
}

@media (max-width: 860px) {
  .kv-home > .kv-gallery-home { --hero-art-height: clamp(232px, 75vw, 460px); }
  .kv-gallery-home > .wrap { padding-bottom: calc(var(--hero-art-height) + var(--platform-size) + 24px); }
  .kv-gallery-home .hero-service-backdrop {
    bottom: calc(var(--platform-size) + 20px);
    mask-image: linear-gradient(180deg, transparent, #000 11% 94%, transparent);
  }
  .kv-gallery-home .hero-service-backdrop img { object-position: right center; }
  .kv-hero-platforms { right: 50%; bottom: 12px; transform: translateX(50%); }
}

@media print, (forced-colors: active) {
  .kv-hero-platforms { display: none; }
}

/* Standard inner pages retain their two-column hero and use the selected artwork. */
.kv-scene-host .kv-gallery-hero-art {
  --gallery-hero-ratio: 1.48;
  --gallery-hero-crop: 100% 53%;
  max-width: 630px;
  aspect-ratio: var(--gallery-hero-ratio);
  justify-self: end;
  border-radius: clamp(16px, 2.2vw, 32px);
  overflow: hidden;
}

.kv-scene-host .kv-gallery-hero-art::before { content: none; }

.kv-gallery-hero-art .kv-gallery-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  object-position: var(--gallery-hero-crop);
  mask-image: linear-gradient(90deg, transparent, #000 24%);
}

.kv-scene-host .kv-gallery-hero-art:is(.art-pricing, .art-pay, .art-privacy, .art-terms, .art-refund-policy, .art-404) {
  --gallery-hero-ratio: 1.88;
  max-width: 545px;
}

.kv-scene-host .kv-gallery-hero-art:is(.art-creatives, .art-motion-ads) { --gallery-hero-crop: 100% 50%; }

@media (max-width: 740px) {
  .kv-scene-host .kv-gallery-hero-art {
    --gallery-hero-ratio: 1.61;
    max-width: 460px;
    justify-self: center;
  }
  .kv-scene-host .kv-gallery-hero-art:is(.art-pricing, .art-pay, .art-privacy, .art-terms, .art-refund-policy, .art-404) {
    --gallery-hero-ratio: 1.83;
    max-width: 395px;
  }
  .kv-gallery-hero-art .kv-gallery-hero-image { mask-image: linear-gradient(180deg, #0008, #000 14%); }
}

@media (forced-colors: active) {
  .kv-gallery-hero-art .kv-gallery-hero-image { mask-image: none; }
}

/* Special page contexts. Existing grids, real founder content, live event
   illustration, video controls and all copy retain their authored structure. */
.kv-light-photo-context {
  position: relative;
  isolation: isolate;
}
.kv-light-photo-context > .kv-context-photo-art {
  position: absolute;
  inset: 0;
  display: block;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.kv-light-photo-context > .kv-context-photo-art > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.kv-light-photo-context > .kv-context-photo-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* About: the light studio photograph supports the connected-practice diagram.
   Only the old decorative diagram backdrop changes; the founder portrait below
   this hero is not selected by these rules. */
.kv-context-about.about-hero.kv-light-photo-context {
  background: #faf8f4;
}
.kv-context-about > .kv-context-photo-art > img {
  object-position: 73% 48%;
}
.kv-context-about > .kv-context-photo-art::after {
  background:
    linear-gradient(180deg, #fffefd 0%, #fffefdf5 7%, #fffefd00 24%),
    linear-gradient(90deg, #fffefd 0%, #fffefdf2 30%, #fffefd8c 57%, #fffefd18 100%),
    linear-gradient(0deg, #fffefd 0%, #fffefd99 12%, transparent 36%);
}
.kv-context-about.kv-light-photo-context .about-system {
  background: linear-gradient(130deg, #fffffff2, #f6f8f5f2);
  border-color: #d9e2db;
  box-shadow: 0 20px 45px -32px #263b3e40;
}
.kv-context-about.kv-light-photo-context .about-edition,
.kv-context-about.kv-light-photo-context .about-intro-note {
  border-color: #d9e2db;
}

/* Tracking: keep the interactive event map crisp on its own surface; the new
   glass-route illustration is a decorative background, never live telemetry. */
.kv-context-tracking.measure-hero.kv-light-photo-context {
  background: #f6f9f8;
}
.kv-context-tracking > .kv-context-photo-art > img {
  object-position: 74% 48%;
}
.kv-context-tracking > .kv-context-photo-art::after {
  background:
    linear-gradient(180deg, #f7faf8 0%, #f7faf8eb 7%, #f7faf800 24%),
    linear-gradient(90deg, #fff 0%, #fffffff2 30%, #ffffff9c 57%, #ffffff21 100%),
    linear-gradient(0deg, #f7faf8 0%, #f7faf8c7 9%, transparent 31%);
}
.kv-context-tracking.kv-light-photo-context .measure-map {
  background: linear-gradient(155deg, #f7fbf9fa, #fffffffa 54%, #f5f4fcfa);
  box-shadow: 0 24px 48px -34px #233f454d;
}
.kv-context-tracking.kv-light-photo-context .measure-edition,
.kv-context-tracking.kv-light-photo-context .measure-platforms {
  border-color: #d7e3de;
}

/* Roofing already has a background plane above the offer box. Replace that
   image while retaining the sample film, package and jump navigation in flow. */
.kv-context-roofing.hero--photo.kv-light-photo-context {
  background: #fff;
}
.kv-context-roofing.hero--photo.kv-light-photo-context > .kv-context-photo-art {
  inset: 0 0 auto;
  height: clamp(430px, 49vw, 740px);
  opacity: 1;
  z-index: -1;
  mask-image: linear-gradient(to bottom, #000 69%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 69%, transparent 100%);
}
.kv-context-roofing > .kv-context-photo-art > img {
  object-position: 73% 48%;
}
.kv-context-roofing.hero--photo > .kv-context-photo-art::after {
  background: linear-gradient(90deg, #fff 0%, #fffffff0 31%, #ffffff94 56%, #ffffff26 100%);
}

@media (max-width: 1000px) {
  .kv-context-about > .kv-context-photo-art > img,
  .kv-context-tracking > .kv-context-photo-art > img {
    object-position: 77% top;
  }
  .kv-context-about > .kv-context-photo-art::after {
    background:
      linear-gradient(180deg, #fffefdf2 0%, #fffefddb 35%, #fffefd8c 70%, #fffefd 100%),
      linear-gradient(90deg, #fffefdb3, #fffefd33);
  }
  .kv-context-tracking > .kv-context-photo-art::after {
    background:
      linear-gradient(180deg, #fffffff2 0%, #ffffffde 40%, #ffffff7a 72%, #f7faf8 100%),
      linear-gradient(90deg, #ffffffb3, #ffffff21);
  }
}
@media (max-width: 740px) {
  .kv-context-about > .kv-context-photo-art,
  .kv-context-tracking > .kv-context-photo-art {
    height: min(100%, 690px);
  }
  .kv-context-about > .kv-context-photo-art > img {
    object-position: 72% top;
  }
  .kv-context-tracking > .kv-context-photo-art > img {
    object-position: 72% top;
  }
  .kv-context-about > .kv-context-photo-art::after {
    background: linear-gradient(180deg, #fffefdeb 0%, #fffefde0 58%, #fffefd 100%);
  }
  .kv-context-tracking > .kv-context-photo-art::after {
    background: linear-gradient(180deg, #ffffffed 0%, #ffffffe3 60%, #f7faf8 100%);
  }
  .kv-context-roofing.hero--photo.kv-light-photo-context > .kv-context-photo-art {
    height: 610px;
    opacity: 1;
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  }
  .kv-context-roofing > .kv-context-photo-art > img {
    object-position: 73% top;
  }
  .kv-context-roofing.hero--photo > .kv-context-photo-art::after {
    background: linear-gradient(180deg, #fffffff2 0%, #ffffffeb 56%, #ffffffc4 100%);
  }
}
@media print, (forced-colors: active) {
  .kv-light-photo-context > .kv-context-photo-art {
    display: none;
  }
}
