.capabilities {
  position: relative;
  background: #070B14;
  color: #F5F7FA;
  padding: 5.5rem 0 0;
}
.cap-intro {
  max-width: 38rem;
  padding: 0 var(--inset) 2.5rem;
}
.cap-kicker {
  margin: 0 0 0.8rem;
  font-family: "Hanken Grotesk", "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9AA6B7;
}
.cap-kicker span { color: #146BFF; }
.cap-intro h2 {
  margin: 0;
  font-family: "Hanken Grotesk", "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.cap-intro p:last-child {
  margin: 0.9rem 0 0;
  max-width: 32rem;
  color: #9AA6B7;
  font-size: 1.05rem;
}
.cap-field {
  position: relative;
  height: 175vh;
  margin: 0 var(--inset);
}
.cap-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cap-route,
.cap-pulse {
  fill: none;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.cap-route { stroke: rgba(20, 107, 255, 0.45); }
.cap-pulse { stroke: #00A8FF; }
.cap {
  position: absolute;
  width: min(22rem, 34vw);
  z-index: 1;
  scroll-margin-top: calc(var(--header) + 1rem);
}
.cap:nth-of-type(1) { left: 6%; top: 6%; }
.cap:nth-of-type(2) { left: 54%; top: 16%; }
.cap:nth-of-type(3) { left: 8%; top: 28%; }
.cap:nth-of-type(4) { left: 56%; top: 38%; }
.cap:nth-of-type(5) { left: 26%; top: 50%; }
.cap:nth-of-type(6) { left: 6%; top: 62%; }
.cap:nth-of-type(7) { left: 52%; top: 72%; }
.cap:nth-of-type(8) { left: 24%; top: 84%; }
.cap-hit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}
.cap-num {
  grid-column: 1;
  font-family: "Hanken Grotesk", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #146BFF;
}
.cap-name {
  grid-column: 1;
  margin-top: 0.2rem;
  font-family: "Hanken Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  background-image: linear-gradient(#146BFF, #146BFF);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 340ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cap-visual {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  width: 4.4rem;
  color: #9AA6B7;
  opacity: 0.4;
  transition: opacity 340ms cubic-bezier(0.2, 0.8, 0.2, 1), color 340ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cap-visual svg { width: 100%; height: auto; display: block; }
.cap-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 380ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 280ms linear;
}
.cap-detail > span { overflow: hidden; }
.cap-line {
  display: block;
  max-width: 26rem;
  margin-top: 0.55rem;
  color: #9AA6B7;
  font-size: 0.95rem;
  line-height: 1.45;
}
.cap.is-active .cap-name,
.cap-hit:hover .cap-name,
.cap-hit:focus-visible .cap-name { background-size: 2.2rem 1px; }
.cap.is-active .cap-visual,
.cap-hit:hover .cap-visual,
.cap-hit:focus-visible .cap-visual { opacity: 1; color: #00A8FF; }
.cap.is-active .cap-detail,
.cap-hit:hover .cap-detail,
.cap-hit:focus-visible .cap-detail {
  grid-template-rows: 1fr;
  opacity: 1;
}
#services { scroll-margin-top: calc(var(--header) + 0.5rem); }

@media (max-width: 900px) {
  .capabilities { padding-top: 4rem; }
  .cap-field {
    height: auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0.5rem var(--inset) 3.5rem calc(var(--inset) + 0.15rem);
  }
  .cap-field::before {
    content: "";
    position: absolute;
    left: var(--inset);
    top: 0.5rem;
    bottom: 3.5rem;
    width: 1px;
    background: rgba(20, 107, 255, 0.55);
  }
  .cap-path { display: none; }
  .cap,
  .cap:nth-of-type(n) {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    padding: 1.15rem 0 1.15rem 1.15rem;
  }
  .cap.is-active { box-shadow: inset 1px 0 0 #146BFF; }
  .cap-detail { grid-template-rows: 1fr; opacity: 1; }
  .cap-visual { width: 3.2rem; opacity: 0.7; }
  .cap-name { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cap-field {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding-bottom: 4rem;
  }
  .cap,
  .cap:nth-of-type(n) {
    position: relative;
    left: auto;
    top: auto;
    width: min(36rem, 100%);
    opacity: 1 !important;
  }
  .cap-path { display: none; }
  .cap-detail { grid-template-rows: 1fr; opacity: 1; }
  .cap-visual { opacity: 1; }
  .cap-pulse { display: none; }
}
