.card {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Fills its grid cell whether it is a direct child or wrapped in StaggerItem. */
  height: 100%;
  gap: var(--space-4);
  padding: var(--card-pad);
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background: var(--surface);
  box-shadow: var(--specular);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: background var(--speed-fast) var(--ease-out),
    border-color var(--speed-fast) var(--ease-out),
    translate var(--speed-base) var(--ease-out);
}

.card:hover {
  /* `translate`, not `transform`: Framer Motion owns transform on the
     StaggerItem wrapper this card sits inside on the homepage. */
  translate: 0 var(--lift);
  background: var(--surface-hi);
  border-color: var(--border-strong);
}

.head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.client {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.sector {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.headline {
  position: relative;
  margin: 0;
  /* Capped so a lone card stretched to full grid width keeps a readable measure. */
  max-width: 46ch;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.28;
  color: var(--text-primary);
}

.summary {
  position: relative;
  margin: 0;
  max-width: 78ch;
  color: var(--text-body);
  line-height: 1.72;
  font-size: 15px;
}

.stack {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stackItem {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.foot {
  position: relative;
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.period {
  font-size: 13px;
  color: var(--text-muted);
}

.readMore {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.readMore svg {
  transition: transform var(--speed-fast) var(--ease-out);
}

.card:hover .readMore svg {
  transform: translateX(3px);
}

@media (max-width: 767px) {
  .card {
    padding: 22px;
  }
}
