.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding-top: var(--nav-height);
}

.hero__layout {
  align-items: center;
}

.hero__content {
  max-width: 38rem;
}

@media (min-width: 769px) {
  .hero__layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .hero__actions {
    grid-column: 1;
  }
}

.hero__actions {
  order: 3;
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.cube-scene {
  width: 200px;
  height: 250px;
  position: relative;
}

.cube {
  width: 100px;
  height: 100px;
  position: absolute;
  z-index: 2;
  transform: rotateX(-36deg) rotateY(45deg);
  transform-style: preserve-3d;
}

.cube_count_1 {
  z-index: 2;
  left: 50px;
}
.cube_count_4 {
  z-index: 2;
  top: 116px;
  left: -16px;
}
.cube_count_5 {
  z-index: 1;
  top: 116px;
  left: 116px;
}

.cube-scene {
  filter: drop-shadow(0 0 8px rgba(3, 233, 244, 0.8)) drop-shadow(0 0 24px rgba(3, 233, 244, 0.4));
}

.cube__face {
  width: 100px;
  height: 100px;
  position: absolute;
  background: rgba(3, 233, 244, 0.18);
  border: 2px solid rgba(3, 233, 244, 0.9);
  box-shadow:
    0 0 6px rgba(3, 233, 244, 0.6),
    inset 0 0 8px rgba(3, 233, 244, 0.2);
}

.cube__face--front {
  box-shadow: inset -4px -4px 0 0 rgba(3, 233, 244, 0.4);
  animation: cube-face-front 2s ease infinite;
  transform: rotateY(0deg) translateZ(50px);
}
.cube__face--right {
  animation: cube-face-right 2s ease infinite;
  transform: rotateY(90deg) translateZ(50px);
}
.cube__face--back {
  animation: cube-face-back 2s ease infinite;
  transform: rotateY(180deg) translateZ(50px);
}
.cube__face--left {
  box-shadow: inset 4px -4px 0 0 rgba(3, 233, 244, 0.4);
  animation: cube-face-left 2s ease infinite;
  transform: rotateY(-90deg) translateZ(50px);
}
.cube__face--top {
  box-shadow: inset -4px 4px 0 0 rgba(3, 233, 244, 0.4);
  animation: cube-face-top 2s ease infinite;
  transform: rotateX(90deg) translateZ(50px);
}
.cube__face--bottom {
  transform: rotateX(-90deg) translateZ(50px);
}




@keyframes cube-face-front {
  0%   { box-shadow: inset -4px -4px 0 0 rgba(3, 233, 244, 0.4); }
  50%  { box-shadow: inset 0 0 0 0 rgba(3, 233, 244, 0); }
  100% { box-shadow: inset -4px -4px 0 0 rgba(3, 233, 244, 0.4); }
}
@keyframes cube-face-right {
  0%   { box-shadow: inset 0 0 0 0 rgba(3, 233, 244, 0); }
  50%  { box-shadow: inset 4px -4px 0 0 rgba(3, 233, 244, 0.4); }
  100% { box-shadow: inset 0 0 0 0 rgba(3, 233, 244, 0); }
}
@keyframes cube-face-back {
  0%   { box-shadow: inset 0 0 0 0 rgba(3, 233, 244, 0); }
  50%  { box-shadow: inset -4px -4px 0 0 rgba(3, 233, 244, 0.4); }
  100% { box-shadow: inset 0 0 0 0 rgba(3, 233, 244, 0); }
}
@keyframes cube-face-left {
  0%   { box-shadow: inset 4px -4px 0 0 rgba(3, 233, 244, 0.4); }
  50%  { box-shadow: inset 0 0 0 0 rgba(3, 233, 244, 0); }
  100% { box-shadow: inset 4px -4px 0 0 rgba(3, 233, 244, 0.4); }
}
@keyframes cube-face-top {
  0%   { box-shadow: inset -4px 4px 0 0 rgba(3, 233, 244, 0.4); }
  50%  { box-shadow: inset 0 0 0 0 rgba(3, 233, 244, 0); }
  100% { box-shadow: inset -4px 4px 0 0 rgba(3, 233, 244, 0.4); }
}

.hero__title {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.hero__lead {
  max-width: 34rem;
  font-size: clamp(0.92rem, 1.6vw, 1.05rem);
  color: var(--color-text-muted);
}



@media (max-width: 768px) {
  .hero__title {
    font-size: clamp(2.4rem, 11vw, 3.7rem);
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__layout {
    display: flex;
    flex-direction: column;
  }

  .hero__content {
    order: 1;
  }

  .hero__visual {
    order: 2;
  }


  .hero__actions {
    order: 3;
  }
}

.service-details {
  padding-top: 0;
}

.services.section {
  padding-block: var(--space-4);
  scroll-margin-top: var(--nav-height);
}

.services.section .stack-xl {
  gap: var(--space-4);
}

.services.section .section-heading {
  gap: var(--space-2);
}

.services.section .section-lead {
  max-width: 40rem;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1rem;
}

@media (max-width: 1024px) {
  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .counter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .counter-detail {
    font-size: 0.72rem;
  }
}

@media (max-width: 768px) {
  .section-title,
  .detail-title {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .service-card,
  .case-card,
  .contact-form {
    border-radius: 18px;
  }

  .counter-item {
    padding: 1.4rem 1rem;
  }

  .counter-value {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .hero .stack-lg {
    gap: var(--space-4);
  }

  .hero .stack-xl {
    gap: var(--space-6);
  }

  .service-detail {
    padding-block: var(--space-8);
  }

  .service-detail .stack-lg {
    gap: var(--space-4);
  }

  .cases-grid {
    gap: 0.75rem;
  }

  .company .stack-xl {
    gap: var(--space-8);
  }
}
