.home-services {
  width: min(1440px, calc(100% - 32px));
  margin: 22px auto;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 107, 26, 0.08), transparent 28%),
    rgba(12, 18, 29, 0.94);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.home-services__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 28px;
}

.home-services__head > div {
  max-width: 760px;
}

.home-services__head span {
  color: var(--company-accent, var(--primary));
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.home-services__head h2 {
  margin: 9px 0 13px;
  color: var(--text);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.home-services__head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.home-services__head > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 107, 26, 0.28);
  border-radius: 999px;
  color: #ffc49f;
  background: rgba(255, 107, 26, 0.07);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.home-services__head > a:hover {
  border-color: rgba(255, 107, 26, 0.55);
  background: rgba(255, 107, 26, 0.12);
  transform: translateY(-2px);
}

.home-services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-services__grid > a {
  position: relative;
  min-width: 0;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.home-services__grid > a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, var(--company-accent, var(--primary)), transparent);
}

.home-services__grid > a::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.014);
  pointer-events: none;
}

.home-services__grid > a:hover {
  z-index: 1;
  border-color: rgba(255, 107, 26, 0.36);
  background: linear-gradient(145deg, rgba(255, 107, 26, 0.09), rgba(255, 255, 255, 0.02));
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
  transform: translateY(-5px);
}

.home-services__grid small {
  position: relative;
  z-index: 1;
  color: #ffad78;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.home-services__grid h3 {
  position: relative;
  z-index: 1;
  margin: 15px 0 12px;
  color: var(--text);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.home-services__grid p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #8f9bad;
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}

.home-services__grid a > span {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 22px;
  color: #e6ebf2;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.home-services__grid a > span::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin: 0 0 4px 9px;
  background: var(--company-accent, var(--primary));
  transition: width 0.2s ease;
}

.home-services__grid > a:hover > span::after {
  width: 34px;
}

.home-services__grid > a:focus-visible,
.home-services__head > a:focus-visible {
  outline: 3px solid rgba(255, 107, 26, 0.45);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .home-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .home-services {
    width: calc(100% - 20px);
    padding: 24px 18px;
    border-radius: 24px;
  }

  .home-services__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .home-services__grid {
    grid-template-columns: 1fr;
  }

  .home-services__grid > a {
    min-height: 185px;
    padding: 19px;
  }

  .home-services__grid h3 { margin: 12px 0 9px; }
  .home-services__grid a > span { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-services__grid > a,
  .home-services__head > a,
  .home-services__grid a > span::after {
    transition: none;
  }
}
