/* Layout + motion layer for the hero, about, works, testimonials and footer.
   Every scroll-linked transform here is driven by Lenis (assets/js/israel-motion.js). */

/* ---------- hero: the photo belongs to the scene instead of sitting on it ---------- */
.banner-three-man {
  pointer-events: none;
}
.ism-hero-photo {
  display: block;
  will-change: transform;
}
.banner-three-man img {
  /* fade the bottom of the cut-out into the page like the template's original portrait */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
  will-change: transform;
}
.banner-three-title {
  will-change: transform;
}
.banner-three-left,
.banner-three-right {
  will-change: transform;
}

/* ---------- about: small photo card next to the text ---------- */
.about-three-thumb {
  max-width: 380px;
  margin-inline: auto 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.about-three-thumb img {
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transform: scale(1.12);
}
@media (max-width: 1199px) {
  .about-three-thumb {
    max-width: 320px;
    margin-inline: auto;
    margin-bottom: 32px;
  }
}

/* ---------- works: compact row of four cards ---------- */
.ism-works {
  position: relative;
  padding-block: 110px 120px;
  overflow: clip;
  isolation: isolate;
}
.ism-works__ghost {
  position: absolute;
  top: 50%;
  inset-inline-start: 0;
  transform: translateY(-50%);
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(200px, 30vw, 520px);
  line-height: 0.8;
  white-space: nowrap;
  color: hsl(var(--black));
  opacity: 0.06;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
.ism-works__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.ism-works__title.ism-head {
  /* size and motion come from the shared section heading (.ism-head in israel-sections.css); here it shares a row with the button */
  display: inline-flex;
  margin: 0;
}
.ism-works__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
/* .ism-work (fanned by israel-motion.js) and its card layer (tilted by israel-sections.js) live in israel-sections.css */
.ism-work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* --drift comes from the scroll (israel-motion.js), --hx/--hy/--hs from the pointer (israel-sections.js) */
  transform: translate3d(var(--hx, 0px), calc(var(--drift, 0%) + var(--hy, 0px)), 0) scale(var(--hs, 1.12));
  will-change: transform;
}
.ism-work__title {
  font-family: var(--heading-font);
  font-size: clamp(26px, 2vw, 34px);
  line-height: 1;
  color: hsl(var(--black));
  margin-bottom: 12px;
  min-height: 2em;
}
@media (max-width: 991px) {
  .ism-works__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) and (max-width: 1399px) {
  .ism-work__media {
    aspect-ratio: 4 / 3;
  }
  .ism-work__title {
    font-size: 24px;
    min-height: 2.1em;
  }
}
@media (max-width: 767px) {
  /* phones: a swipeable rail instead of a stack, so the section stays short */
  .ism-works {
    padding-block: 80px 90px;
  }
  .ism-works__grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: -16px;
    padding: 6px 16px 18px;
    scrollbar-width: none;
  }
  .ism-works__grid::-webkit-scrollbar {
    display: none;
  }
  .ism-work {
    flex: 0 0 78%;
    scroll-snap-align: center;
  }
}

/* ---------- testimonials: smaller photo, Swiper keeps sizing the slides ---------- */
.testimonial-three-area .swiper-slide img {
  max-width: 180px;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (max-width: 767px) {
  .testimonial-three-area .swiper-slide img {
    max-width: 130px;
  }
}

/* ---------- client logos: a tidy row of tiles instead of the template's gapped pattern ---------- */
.brand-three-area .row.gx-2 > div:empty {
  display: none;
}
@media (max-width: 1199px) {
  .brand-three-area .row.gx-2 > div {
    flex: 0 0 auto;
    width: 25%;
  }
}
@media (max-width: 575px) {
  .brand-three-area .row.gx-2 > div {
    width: 50%;
  }
}

/* ---------- footer: true black to the very bottom ---------- */
.footer-three-area {
  background-color: #000 !important;
}
.footer-three-area .footer-three-bottom,
.footer-three-area .footer-three-border {
  background-color: #000;
}
.footer-three-area > img,
.footer-three-area [class*="bg-shape"] {
  opacity: 0.35;
}
/* the page canvas below/around the body (overscroll, end of page) is black like the footer */
html {
  background-color: #000;
}

@media (prefers-reduced-motion: reduce) {
  .about-three-thumb img,
  .ism-work__media img {
    transform: none;
  }
}

/* logos: centre the row; shorter tiles on phones */
.brand-three-area .row.gx-2 {
  justify-content: center;
}
@media (max-width: 575px) {
  .brand-three-area .brand-three-item {
    min-height: 0;
    height: 96px;
  }
}

/* hero word: sharp at the top, the lower part softens and dissolves into the background */
.banner-three-title {
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, rgba(0, 0, 0, 0.6) 60%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 30%, rgba(0, 0, 0, 0.6) 60%, transparent 94%);
}
.banner-three-title::after {
  /* a blurred copy of the same word that takes over toward the bottom */
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: inherit;
  filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 28%, #000 72%);
  mask-image: linear-gradient(to bottom, transparent 28%, #000 72%);
  pointer-events: none;
}

/* services: three rows (apps, sites, automations), each with one short line under the title */
.ism-service-text {
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.6;
  max-width: 44ch;
  margin: 0;
}
@media (max-width: 767px) {
  .ism-service-text {
    font-size: 16px;
  }
}
