.banner-picture {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  main :is(.home-hero, .mobile-business-banner) {
    --mobile-banner-height: clamp(696px, 217.413vw, 1040px);
    --mobile-banner-start: clamp(16px, 4.485vw, 24px);
    --mobile-banner-end: clamp(14px, 3.9vw, 24px);
    padding: 0;
  }

  .hero-section.hero-section--centered.home-hero {
    display: block;
    min-height: max(100svh, min(720px, 185vw));
    background: #a4c3e4;
  }

  .home-hero::after {
    background: #97bee3;
    mask-image: linear-gradient(180deg,
      #000 0% 37%,
      rgb(0 0 0 / .72) 41%,
      transparent 47%);
  }

  .home-hero .hero-video {
    inset: -16.51% auto auto -35.2%;
    width: 142.56%;
    height: 116.51%;
    max-width: none;
    object-position: right bottom;
    transform: none;
  }

  .hero-section.hero-section--centered.home-hero > .hero-grid {
    display: block;
    padding: clamp(112px, 15svh, 140px) var(--mobile-banner-end) 36px var(--mobile-banner-start);
  }

  .hero-section.hero-section--centered.home-hero .hero-top-info {
    width: 100%;
    max-width: 520px;
    margin: 0;
  }

  .hero-section.hero-section--centered.home-hero .hero-main-title,
  main .mobile-business-banner .grow-business-title {
    max-width: 360.094px;
    margin: 0;
    font-weight: 500;
    line-height: 1.21;
    letter-spacing: normal;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
  }

  .hero-section.hero-section--centered.home-hero .hero-main-title {
    max-width: 100%;
    color: #fff;
    font-size: clamp(28px, 8.2vw, 40px);
    line-height: 1.1;
    letter-spacing: -.025em;
  }

  main .mobile-business-banner .grow-business-title em {
    color: #f00;
    font-weight: 500;
    letter-spacing: normal;
  }

  .home-hero .hero-main-title em {
    color: #f00;
    font-weight: 500;
    letter-spacing: -.035em;
    white-space: nowrap;
  }

  main .mobile-business-banner .grow-business-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 21px;
  }

  .home-hero .hero-desc {
    margin: clamp(18px, 5.5vw, 24px) 0 0;
    color: #fff;
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 500;
    line-height: 1.3;
  }

  .hero-section.hero-section--centered.home-hero .hero-ctas,
  main .mobile-business-banner :is(.grow-business-benefits, .grow-business-secondary) {
    display: none;
  }

  main .mobile-business-banner .grow-business-copy > .eyebrow {
    display: block;
    margin-bottom: 18px;
  }

  main .mobile-business-banner {
    --business-image-height: clamp(410px, 112vw, 500px);
    --business-image-overlap: clamp(76px, 21vw, 92px);
    min-height: 0;
    scroll-margin-top: 72px;
    background: #f6f3f1;
  }

  main .mobile-business-banner::after {
    display: none;
  }

  main .mobile-business-banner .banner-picture {
    inset: auto 0 0;
    z-index: 0;
    height: calc(var(--business-image-height) + var(--business-image-overlap));
    overflow: hidden;
    background: #e4d8d2;
  }

  main .mobile-business-banner .banner-picture::after {
    position: absolute;
    inset: 0 0 auto;
    z-index: 1;
    height: clamp(130px, 38vw, 180px);
    background: linear-gradient(180deg,
      #f6f3f1 0%,
      rgb(246 243 241 / .92) 24%,
      rgb(246 243 241 / .55) 58%,
      rgb(246 243 241 / 0) 100%);
    content: '';
    pointer-events: none;
  }

  main .mobile-business-banner .grow-business-bg {
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 68%;
    filter: none;
  }

  main .mobile-business-banner .grow-business-inner {
    display: block;
    min-height: 0;
    padding: 48px 18px calc(var(--business-image-height) - 62px);
  }

  main .mobile-business-banner .grow-business-copy {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
  }

  main .mobile-business-banner .grow-business-title {
    max-width: 430px;
    font-size: clamp(32px, 9.2vw, 40px);
    line-height: 1.06;
    letter-spacing: -.035em;
  }

  main .mobile-business-banner .grow-business-text {
    max-width: 520px;
    margin: 22px 0 24px;
    color: #4f5259;
    line-height: 1.42;
  }

  main .mobile-business-banner .grow-business-actions {
    width: 100%;
    max-width: 360px;
  }

  main .mobile-business-banner .grow-business-actions .btn-primary {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    padding-inline: 20px;
    border-radius: 30px;
    background: #f00;
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  main .mobile-business-banner .grow-business-inner {
    padding-inline: 16px;
  }
}

@media (min-width: 501px) and (max-width: 768px) {
  .home-hero .hero-video {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .home-hero .hero-video {
    object-position: center 80%;
  }

}

/* --- City and direction heroes on phones: centred poster. Copy on the sky, people centred right under it,
       height follows the content so there is no empty band. Works for any city name. --- */
@media (max-width: 768px) {
  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) {
    position: relative;
    display: flex;
    flex-direction: column;
    /* Full screen like the home hero, minus the bottom tab bar; the picture keeps its size. */
    min-height: calc(100svh - 64px - env(safe-area-inset-bottom));
    padding: 0;
    overflow: hidden;
    background: #96b4dc;
  }

  /* No darkening: the copy sits on the plain sky of the frame. */
  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction)::after {
    display: none;
  }

  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) > .hero-grid {
    position: relative;
    z-index: 2;
    display: block;
    flex: 1 0 auto;
    order: 0;
    height: auto;
    padding: clamp(104px, 28vw, 136px) 20px 0;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) :is(.city-hero-breadcrumbs, .category-breadcrumbs) {
    position: static;
    inset: auto;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    margin: 0 0 16px;
    font-size: 13px;
  }

  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) .hero-top-info {
    /* Desktop positions this block at left: 24px with width: 100%. On mobile that
       makes the last 24px leave the viewport, so centre the absolute block explicitly. */
    right: auto;
    left: 50%;
    width: calc(100% - 40px);
    max-width: 560px;
    margin: 0;
    transform: translate(-50%, -50%);
    text-align: center;
  }

  /* Keep copy in normal flow so the image starts below the text instead of
     moving the people underneath it. */
  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) .hero-top-info {
    position: static;
    right: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    transform: none;
  }

  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) .hero-main-title {
    max-width: 100%;
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 9.2vw, 48px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.025em;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  :is(.city-hero, .category-hero--direction) .hero-main-title em {
    display: block;
    color: #f00;
    font-weight: 500;
    letter-spacing: -.035em;
  }

  :is(.city-hero, .category-hero--direction) .hero-desc {
    max-width: 34ch;
    margin: 16px auto 0;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) .hero-ctas {
    display: none;
  }

  /* The three people stand in the right half of the frame (49–99% of its width).
     At 192vw the frame still covers the right edge (-92 + 192 = 100vw) and they stand centred;
     its sky slides under the copy. */
  :is(.city-hero, .category-hero--direction) .hero-video {
    position: relative;
    z-index: 1;
    order: 1;
    display: block;
    inset: auto;
    width: 192vw;
    max-width: none;
    height: auto;
    margin: -10vw 0 0 -92vw;
    object-fit: fill;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26%);
    mask-image: linear-gradient(180deg, transparent 0, #000 26%);
  }
}

@media (min-width: 501px) and (max-width: 768px) {
  .hero-section.hero-section--centered:is(.city-hero, .category-hero--direction) .hero-main-title {
    font-size: clamp(32px, 6.2vw, 42px);
  }

  :is(.city-hero, .category-hero--direction) .hero-desc {
    max-width: min(34ch, 100%);
  }

  /* Tablets: a smaller frame that still reaches the right edge; the group sits slightly right of centre. */
  :is(.city-hero, .category-hero--direction) .hero-video {
    width: 160vw;
    margin: -18vw 0 0 -60vw;
  }
}


/* Direction hero (web development, Kazakhstan): people stand at 54–97% of the frame width,
   so the frame is wider (206vw) to centre them and still cover the right edge. */
@media (max-width: 768px) {
  .hero-section.hero-section--centered.category-hero--direction {
    background: #8db2dc;
  }

  /* Copy is in normal flow; keep the people below it and retain enough sky for a soft transition. */
  .category-hero--direction .hero-video {
    width: 206vw;
    margin: -12vw 0 0 -105.5vw;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20%);
    mask-image: linear-gradient(180deg, transparent 0, #000 20%);
  }

  .hero-section.hero-section--centered.category-hero--direction .hero-main-title {
    font-size: clamp(28px, 8vw, 44px);
  }
}

@media (min-width: 501px) and (max-width: 768px) {
  .category-hero--direction .hero-video {
    width: 170vw;
    margin: -16vw 0 0 -70vw;
  }

  .hero-section.hero-section--centered.category-hero--direction .hero-main-title {
    font-size: clamp(32px, 6.2vw, 42px);
  }
}
