/**
 * Homepage service rows + services-page stationary cards with floating desc.
 */

.services-list {
  max-width: 1100px;
  margin: 60px auto 40px;
  padding: 0 24px;
  box-sizing: border-box;
}

.services-list .service-row,
body .services-list .service-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 24px;
  align-items: start;
  position: relative;
  padding: 28px 56px 28px 28px;
  margin: 0 0 12px;
  color: #f7f6f2;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: #0a0a0a;
  overflow: hidden;
  transform: none;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
}

body .services-list .service-row:hover,
body .services-list .service-row:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  background: #0d0d0d;
  /* defeat styles.css padding jump + gold gradient */
  padding: 28px 56px 28px 28px;
  transform: none;
}

.service-row::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 52px 52px 0;
  border-color: transparent rgba(255, 200, 87, 0.9) transparent transparent;
  transition: border-width 0.3s ease;
  z-index: 1;
}

.service-row:nth-child(6n+2)::after {
  border-color: transparent rgba(91, 184, 255, 0.85) transparent transparent;
}
.service-row:nth-child(6n+3)::after {
  border-color: transparent rgba(93, 255, 177, 0.75) transparent transparent;
}
.service-row:nth-child(6n+4)::after {
  border-color: transparent rgba(255, 92, 138, 0.8) transparent transparent;
}
.service-row:nth-child(6n+5)::after {
  border-color: transparent rgba(167, 139, 250, 0.85) transparent transparent;
}
.service-row:nth-child(6n+6)::after {
  border-color: transparent rgba(255, 122, 89, 0.85) transparent transparent;
}

.service-number {
  color: #ffc857;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  padding-top: 8px;
  padding-left: 4px;
  line-height: 1.2;
}

.service-row:nth-child(6n+2) .service-number { color: #5bb8ff; }
.service-row:nth-child(6n+3) .service-number { color: #5dffb1; }
.service-row:nth-child(6n+4) .service-number { color: #ff5c8a; }
.service-row:nth-child(6n+5) .service-number { color: #a78bfa; }
.service-row:nth-child(6n+6) .service-number { color: #ff7a59; }

.service-content {
  min-width: 0;
  padding-right: 8px;
}

.service-content h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-weight: 600;
  transform: none;
}

body .services-list .service-row:hover .service-content h3,
body .services-list .service-row:hover h3 {
  color: #ffffff;
  transform: none;
}

/* Process-style desc expand on homepage service rows */
body .services-list .service-row .service-content > p {
  display: block;
  margin: 0;
  max-width: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  white-space: normal;
  font-size: 1.08rem;
  line-height: 1.7;
  color: #ffffff;
  transform: translateX(-14px);
  transition:
    max-width 0.45s ease,
    max-height 0.5s ease,
    opacity 0.4s ease,
    margin 0.35s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

body .services-list .service-row:hover .service-content > p,
body .services-list .service-row:focus-within .service-content > p,
body .services-list .service-row.is-open .service-content > p {
  max-width: 40rem;
  max-height: 12rem;
  opacity: 1;
  margin-top: 12px;
  transform: translateX(0);
}

.service-arrow {
  position: absolute;
  left: 28px;
  bottom: 16px;
  color: rgba(255, 200, 87, 0.9);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.service-row:hover .service-arrow,
.service-row:focus-within .service-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ========== Services page grid ========== */
body [data-services-page-list],
body .services-page-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 96px;
  box-sizing: border-box;
  isolation: isolate;
  position: relative;
  z-index: 1;
  overflow: visible;
}

body [data-services-page-list] .service-block {
  --svc-accent: #ffc857;
  position: relative;
  z-index: 1;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  perspective: none;
  overflow: visible;
  transition: z-index 0s linear;
}

body [data-services-page-list] .service-block:nth-child(6n+2) { --svc-accent: #5bb8ff; }
body [data-services-page-list] .service-block:nth-child(6n+3) { --svc-accent: #5dffb1; }
body [data-services-page-list] .service-block:nth-child(6n+4) { --svc-accent: #ff5c8a; }
body [data-services-page-list] .service-block:nth-child(6n+5) { --svc-accent: #a78bfa; }
body [data-services-page-list] .service-block:nth-child(6n+6) { --svc-accent: #ff7a59; }

body [data-services-page-list] .service-block:hover,
body [data-services-page-list] .service-block:focus-within {
  z-index: 40;
}

body [data-services-page-list] .service-block::before,
body [data-services-page-list] .service-block::after {
  display: none;
  content: none;
}

body [data-services-page-list] .service-block .wrap {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 0;
  min-height: 168px;
  padding: 28px 28px 32px;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  overflow: hidden;
  transform: none;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  box-shadow: none;
  filter: none;
}

body [data-services-page-list] .service-block:hover .wrap,
body [data-services-page-list] .service-block:focus-within .wrap {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transform: none;
}

body [data-services-page-list] .service-block .wrap::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  border-style: solid;
  border-width: 0 48px 48px 0;
  border-color: transparent var(--svc-accent) transparent transparent;
  pointer-events: none;
}

body [data-services-page-list] .service-block .wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    color-mix(in srgb, var(--svc-accent) 35%, transparent) 30%,
    color-mix(in srgb, var(--svc-accent) 18%, transparent) 55%,
    transparent 100%
  );
  transform: translateX(-110%);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0.9;
}

body [data-services-page-list] .service-block:hover .wrap::after,
body [data-services-page-list] .service-block:focus-within .wrap::after {
  transform: translateX(110%);
}

body [data-services-page-list] .service-block .eyebrow {
  position: relative;
  z-index: 3;
  color: var(--svc-accent);
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  margin-bottom: 0.6rem;
  display: block;
}

body [data-services-page-list] .service-block h2 {
  position: relative;
  z-index: 3;
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: #ffffff;
  letter-spacing: -0.02em;
}

body [data-services-page-list] .service-block .svc-float {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% - 18px);
  z-index: 5;
  box-sizing: border-box;
  padding: 20px 20px 64px;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 2px solid var(--svc-accent);
  border-radius: 20px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
  transform-origin: center top;
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.35s,
    box-shadow 0.35s ease;
}

body [data-services-page-list] .service-block:hover .svc-float,
body [data-services-page-list] .service-block:focus-within .svc-float {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-6px) scale(1);
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.75);
}

body [data-services-page-list] .service-block .svc-float .lede {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #ffffff;
  max-height: none;
  opacity: 1;
  overflow: visible;
  transform: none;
}

body [data-services-page-list] .service-block .svc-card-cta {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--svc-accent) 55%, rgba(255, 255, 255, 0.25));
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0;
  transition:
    opacity 0.3s ease 0.05s,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

body [data-services-page-list] .service-block:hover .svc-card-cta,
body [data-services-page-list] .service-block:focus-within .svc-card-cta {
  opacity: 1;
}

body [data-services-page-list] .service-block .svc-card-cta__arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

body [data-services-page-list] .service-block:hover .svc-card-cta__arrow,
body [data-services-page-list] .service-block:focus-within .svc-card-cta__arrow {
  transform: translateX(3px);
}

body [data-services-page-list] .service-block .svc-card-cta:hover {
  background: color-mix(in srgb, var(--svc-accent) 22%, transparent);
  border-color: var(--svc-accent);
  transform: translateX(-50%) scale(1.06);
}

body [data-services-page-list] .service-block .svc-card-cta:hover .svc-card-cta__arrow {
  transform: translateX(6px);
}

body [data-services-page-list] .service-block .btn {
  display: none;
}

@media (max-width: 720px) {
  body [data-services-page-list],
  body .services-page-list {
    grid-template-columns: 1fr;
    padding: 0 16px 48px;
  }

  body [data-services-page-list] .service-block .svc-float {
    position: absolute;
    top: calc(100% - 12px);
  }

  body .services-list .service-row,
  body .services-list .service-row:hover {
    grid-template-columns: 56px 1fr;
    padding: 22px 40px 22px 20px;
  }

  .service-arrow {
    left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .services-list .service-row .service-content > p,
  body [data-services-page-list] .service-block .wrap::after,
  body [data-services-page-list] .service-block .svc-float,
  body [data-services-page-list] .service-block .svc-card-cta,
  body [data-services-page-list] .service-block .svc-card-cta__arrow {
    transition: none;
  }

  body [data-services-page-list] .service-block:hover .wrap::after,
  body [data-services-page-list] .service-block:focus-within .wrap::after {
    transform: none;
    opacity: 0.15;
  }

  body [data-services-page-list] .service-block:hover .svc-float,
  body [data-services-page-list] .service-block:focus-within .svc-float {
    transform: none;
  }
}
