.home-services {
  padding-block: clamp(5rem, 4.2vw, 6rem) clamp(1.5rem, 3.1vw, 4rem);
  color: #f4f7fb;
}

.home-services-heading {
  width: min(89.4%, 58rem);
  margin: 0 auto clamp(2rem, 4.25vw, 5.5rem);
  text-align: center;
  font-family: Plusjakartasans, Arial, sans-serif;
}

.home-services-heading h2 {
  margin: 0;
  color: #5687fa;
  font-size: clamp(2rem, 3.45vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
}

.home-services-heading p {
  margin: .65em auto 0;
  font-size: clamp(1rem, 1.25vw, 1.7rem);
  line-height: 1.35;
  text-wrap: balance;
}

.home-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.15rem, 5.75vw, 7.75rem);
  width: min(88%, 114rem);
  margin-inline: auto;
}

.home-service-card-link {
  --service-radius: clamp(.95rem, 1.28vw, 1.75rem);
  --service-cut: clamp(1.15rem, 1.52vw, 2rem);
  --service-padding: clamp(1.25rem, 2.68vw, 3.55rem);
  --service-art-height: clamp(7.15rem, 10.7vw, 14.2rem);
  display: grid;
  min-width: 0;
  border-radius: var(--service-radius);
  color: inherit;
  text-decoration: none;
}

.home-services .home-service-card-link:focus-visible {
  outline: 2px solid #a0bfff;
  outline-offset: 5px;
}

.home-service-card {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: start;
  gap: clamp(.3rem, .56vw, .75rem);
  min-height: clamp(16.75rem, 19.7vw, 26rem);
  overflow: hidden;
  padding: 0 var(--service-padding) clamp(.95rem, 1.12vw, 1.45rem);
  border: 1px solid #526a83;
  border-block-end: clamp(2px, .19vw, 4px) solid #477bfa;
  border-radius: var(--service-radius) 0 var(--service-radius) var(--service-radius);
  background: radial-gradient(ellipse at 66% 18%, #1b2a3e 0%, transparent 48%), linear-gradient(132deg, #151f2a, #101821 72%);
  clip-path: polygon(0 0, calc(100% - var(--service-cut)) 0, 100% var(--service-cut), 100% 100%, 0 100%);
}

.home-service-card::before {
  position: absolute;
  z-index: 2;
  inset: -1px -1px auto auto;
  width: var(--service-cut);
  aspect-ratio: 1;
  background: #427df5;
  clip-path: polygon(0 0, 24% 0, 100% 76%, 100% 100%, 76% 100%, 0 24%);
  content: "";
  pointer-events: none;
}

.home-service-card-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: clamp(.25rem, .58vw, .65rem);
  min-height: var(--service-art-height);
}

.home-service-card-title {
  z-index: 1;
  margin: .05em 0 0;
  color: #f7f9fe;
  font-family: "Agencyr 1", "Arial Narrow", sans-serif;
  font-size: clamp(1.7rem, 2.03vw, 2.85rem);
  font-weight: 700;
  line-height: .96;
  letter-spacing: .015em;
  -webkit-text-stroke-width: .4px;
}

.home-service-card-title::after {
  display: block;
  width: clamp(2.25rem, 3.75vw, 5rem);
  height: 2px;
  margin-top: .78em;
  background: #527dff;
  content: "";
}

.home-service-card-art {
  position: relative;
  justify-self: end;
  width: calc(100% + var(--service-padding) * .5);
  max-width: calc(var(--service-art-height) * 1.52);
  height: var(--service-art-height);
  margin-inline-end: calc(var(--service-padding) * -.5);
  padding-block: .5rem .22rem;
  transform-origin: 67% 58%;
}

.home-service-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

.home-service-card-art[data-model="bim"] {
  --service-model-image: url("./home/services/bim.webp");
  transform-origin: 67% 24%;
}
.home-service-card-art[data-model="rendering"] { --service-model-image: url("./home/services/rendering.webp"); }
.home-service-card-art[data-model="real-estate"] { --service-model-image: url("./home/services/real-estate.webp"); }

.home-service-card-copy {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f1f4fb;
  font-family: Plusjakartasans, Arial, sans-serif;
  font-size: clamp(.95rem, 1.15vw, 1.6rem);
  line-height: 1.26;
}

.home-service-card-link:focus-visible .home-service-card { border-color: #85a9ed; }

@media (hover: hover) and (pointer: fine) {
  .home-service-card-link:hover .home-service-card {
    border-color: #81a7e0;
    border-block-end-color: #70a1ff;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .home-service-card { transition: border-color .28s ease; }

  .home-service-card-link:hover .home-service-card::after {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 72% 28%, #438aff87, #3266c64f 27%, transparent 55%);
    content: "";
    pointer-events: none;
    animation: home-service-model-aura 1.65s ease both;
  }

  .home-service-card-link:hover .home-service-card-art { animation: home-service-model-lift 1.65s ease both; }

  @supports (mask-image: linear-gradient(black, black)) {
    .home-service-card-link:hover .home-service-card-art::after {
      position: absolute;
      inset: .5rem 0 .22rem;
      background: linear-gradient(115deg, transparent 34%, #86baff45 42%, #e4f0ffd0 49%, #bfd8ffa0 53%, transparent 66%) 100% center / 260% 100% no-repeat;
      mask: var(--service-model-image) right center / contain no-repeat;
      mix-blend-mode: screen;
      content: "";
      pointer-events: none;
      animation: home-service-model-reflection 1.45s .1s ease-in-out both;
    }
  }
}

@keyframes home-service-model-aura {
  0%, 100% { opacity: 0; }
  24%, 76% { opacity: 1; }
}

@keyframes home-service-model-lift {
  0%, 100% { transform: none; }
  31%, 74% { transform: translateY(-4px) scale(1.1); }
}

@keyframes home-service-model-reflection {
  from { background-position: 100% center; opacity: 0; }
  18%, 82% { opacity: 1; }
  to { background-position: 0% center; opacity: 0; }
}

@media (max-width: 75rem) {
  .home-service-grid { width: 92%; gap: clamp(1.05rem, 2.2vw, 1.8rem); }
  .home-service-card-link { --service-padding: clamp(1.2rem, 2.15vw, 1.85rem); }
}

@media (max-width: 62rem) {
  .home-service-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1rem, 3.5vw, 1.7rem);
    width: min(89.4%, 34rem);
  }

  .home-service-card-link {
    --service-padding: clamp(1.25rem, 5.8vw, 2.65rem);
    --service-art-height: clamp(7.6rem, 36vw, 13rem);
  }

  .home-service-card { min-height: auto; }
  .home-service-card-title { font-size: clamp(1.65rem, 6vw, 2.55rem); }
  .home-service-card-copy { font-size: clamp(.94rem, 3.8vw, 1.14rem); line-height: 1.4; }
}
