/* ============================================================
   Services - Editorial hover list
   ============================================================ */

.services-section,
.svc-section {
  position: relative;
  isolation: isolate;
  padding: clamp(86px, 9vw, 140px) 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 255, 136, 0.11), transparent 30%),
    radial-gradient(circle at 88% 100%, rgba(0, 196, 106, 0.1), transparent 28%),
    linear-gradient(180deg, #f3f5f1 0%, #e9ede7 100%);
  color: #050505;
}

.services-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(5, 5, 5, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 5, 5, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  pointer-events: none;
}

.services-shell {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 72px);
  border: 1px solid rgba(5, 5, 5, 0.06);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 246, 0.94)),
    var(--white);
  box-shadow:
    0 28px 80px rgba(5, 5, 5, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.services-editorial-header {
  max-width: 760px;
  margin: 0 auto clamp(30px, 4vw, 54px);
  text-align: center;
}

.services-eyebrow {
  margin: 0 0 14px;
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.services-heading {
  margin: 0;
  color: #111;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.06;
  text-transform: uppercase;
}

.services-heading em {
  display: inline-block;
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
}

.services-content,
.svc-content {
  position: relative;
}

.service-item,
.svc-card {
  --row-fg: #111;
  --row-muted: rgba(17, 17, 17, 0.64);
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(180px, 0.9fr) minmax(260px, 1fr) 54px;
  gap: clamp(18px, 3vw, 42px);
  align-items: center;
  min-height: 126px;
  padding: 28px 28px;
  border-bottom: 1px solid rgba(5, 5, 5, 0.16);
  border-radius: 0;
  background: transparent;
  color: var(--row-fg);
  cursor: pointer;
  outline: none;
  transition:
    background-color 480ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 480ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 480ms cubic-bezier(0.16, 1, 0.3, 1),
    color 480ms cubic-bezier(0.16, 1, 0.3, 1),
    padding-inline 480ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.service-item:first-child,
.svc-card:first-child {
  border-top: 1px solid rgba(5, 5, 5, 0.16);
}

.service-item.is-active,
.service-item:hover,
.service-item:focus-visible,
.svc-card.is-active,
.svc-card:hover,
.svc-card:focus-visible {
  --row-fg: #fff;
  --row-muted: rgba(255, 255, 255, 0.72);
  z-index: 3;
  padding-inline: 30px;
  border-color: transparent;
  border-radius: 12px;
  background: #050505;
  color: var(--row-fg);
  transform: translate3d(0, -1px, 0);
}

.service-number {
  color: var(--row-muted);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  transition: color 420ms ease;
}

.service-title {
  margin: 0;
  color: var(--row-fg);
  font-family: var(--font-display);
  font-size: clamp(1.34rem, 2.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
  transition: color 420ms ease;
}

.service-description {
  max-width: 330px;
  margin: 0;
  color: var(--row-muted);
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  font-weight: 500;
  line-height: 1.55;
  transition: color 420ms ease;
}

.service-arrow {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(5, 5, 5, 0.2);
  border-radius: 50%;
  background: #fff;
  color: #050505;
  flex: 0 0 46px;
  transition:
    background-color 420ms ease,
    border-color 420ms ease,
    color 420ms ease,
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.service-arrow svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.service-item.is-active .service-arrow,
.service-item:hover .service-arrow,
.service-item:focus-visible .service-arrow,
.svc-card.is-active .service-arrow,
.svc-card:hover .service-arrow,
.svc-card:focus-visible .service-arrow {
  border-color: rgba(0, 255, 136, 0.38);
  background: var(--green);
  color: #00170d;
  transform: rotate(45deg) scale(1.05);
}

.service-floating-image {
  position: absolute;
  top: 50%;
  right: 44px;
  z-index: 1;
  width: clamp(158px, 17vw, 220px);
  aspect-ratio: 1.12 / 1;
  border: 5px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(20px, -46%, 0) rotate(8deg) scale(0.84);
  transform-origin: center;
  transition:
    opacity 460ms ease,
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.service-item.is-active .service-floating-image,
.service-item:hover .service-floating-image,
.service-item:focus-visible .service-floating-image,
.svc-card.is-active .service-floating-image,
.svc-card:hover .service-floating-image,
.svc-card:focus-visible .service-floating-image {
  opacity: 1;
  transform: translate3d(0, -50%, 0) rotate(8deg) scale(1);
}

.service-thumb {
  display: none;
}

@media (max-width: 1024px) {
  .services-shell {
    padding: clamp(30px, 4.6vw, 54px);
  }

  .service-item,
  .svc-card {
    grid-template-columns: 46px minmax(150px, 0.82fr) minmax(220px, 1fr) 48px;
    gap: 22px;
    min-height: 116px;
    padding: 24px 22px;
  }

  .service-floating-image {
    right: 42px;
    width: clamp(138px, 17vw, 178px);
  }
}

@media (max-width: 767px) {
  .services-section,
  .svc-section {
    padding: 70px 16px;
  }

  .services-shell {
    padding: 28px 18px;
    border-radius: 20px;
  }

  .services-editorial-header {
    margin-bottom: 26px;
  }

  .services-eyebrow {
    font-size: 0.66rem;
  }

  .services-heading {
    font-size: clamp(1.75rem, 9vw, 2.7rem);
  }

  .service-item,
  .svc-card {
    grid-template-columns: 38px 1fr 44px;
    gap: 14px;
    min-height: 0;
    padding: 20px 0;
    border-radius: 0;
  }

  .service-item.is-active,
  .service-item:hover,
  .service-item:focus-visible,
  .svc-card.is-active,
  .svc-card:hover,
  .svc-card:focus-visible {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .service-title {
    font-size: clamp(1.2rem, 6vw, 1.65rem);
  }

  .service-description {
    grid-column: 2 / -1;
    max-width: none;
    font-size: 0.91rem;
  }

  .service-arrow {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .service-floating-image {
    display: none;
  }

  .service-thumb {
    display: block;
    grid-column: 2 / -1;
    width: min(100%, 320px);
    aspect-ratio: 16 / 10;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    opacity: 0;
    max-height: 0;
    transform: translateY(10px) scale(0.98);
    transition:
      opacity 420ms ease,
      max-height 520ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .service-item.is-active .service-thumb,
  .service-item:hover .service-thumb,
  .service-item:focus-visible .service-thumb,
  .svc-card.is-active .service-thumb,
  .svc-card:hover .service-thumb,
  .svc-card:focus-visible .service-thumb {
    opacity: 1;
    max-height: 230px;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-item,
  .svc-card,
  .service-arrow,
  .service-floating-image,
  .service-thumb {
    transition: none;
  }
}
