/* Capabilities: OHO's "Latest jobs" card grid, one card per practice area plus a closing link card */

.caps {
  padding: clamp(96px, 11vw, 160px) var(--edge) clamp(104px, 12vw, 176px);
}

.caps__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: clamp(36px, 4vw, 56px);
}

.caps__title {
  font-size: clamp(40px, 0.5rem + 4.4vw, 80px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.caps__title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--turquoise) 45%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.caps__intro {
  max-width: 30ch;
  font-size: 18px;
  line-height: 1.45;
  color: var(--on-dark-muted);
}

.caps__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
}

/* Card */
.cap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 24px;
  background: var(--surface-deep);
  box-shadow: 0 4px 12px 4px rgba(56, 206, 187, 0.1);
}

.cap__num {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.cap__title {
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* The title link covers the whole card */
.cap__link {
  text-decoration: none;
}

.cap__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.cap__link:focus-visible {
  outline: none;
}

.cap:has(.cap__link:focus-visible) {
  outline: 2px solid var(--turquoise);
  outline-offset: 4px;
}

.cap__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.cap__tags li {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.45rem;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.cap__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.cap__line {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.cap:hover .arrow-dot,
.cap:focus-within .arrow-dot {
  background: var(--white);
}

.cap:hover .arrow-dot svg:first-child,
.cap:focus-within .arrow-dot svg:first-child {
  transform: translate(150%, -150%);
}

.cap:hover .arrow-dot svg + svg,
.cap:focus-within .arrow-dot svg + svg {
  transform: none;
}

/* Closing card: solid turquoise, the link is the headline */
.cap--cta {
  border-radius: 1.25rem;
  background: var(--turquoise);
  color: var(--surface-deep);
  box-shadow: none;
  transition: background-color 0.3s ease;
}

.cap--cta > .cap__link {
  font-size: clamp(28px, 1rem + 1.2vw, 38px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.cap--cta .cap__foot {
  border-top-color: rgba(27, 28, 30, 0.25);
}

.cap--cta .arrow-dot {
  background: var(--surface-deep);
  color: var(--white);
}

.cap--cta:hover {
  background: var(--yellow);
}

.cap--cta:hover .arrow-dot {
  background: var(--white);
  color: var(--surface-deep);
}

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

@media (max-width: 640px) {
  .caps__grid {
    grid-template-columns: 1fr;
  }

  .cap {
    min-height: 0;
  }
}
