/* cards.css — base card + feature card (12 §5).
   The whole card is one link: put .card__link on the title link; its ::after covers the card. */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.card--link:hover, .card--link:focus-within {
  box-shadow: var(--sh-2);
  transform: translateY(var(--lift));
  border-color: var(--border-strong);
}

.card__link { color: var(--text-strong); text-decoration: none; }
.card__link:hover { color: var(--text-strong); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card__link:focus-visible::after { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-offset); }

.card__title { font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-h3); }

.card__text, .clamp-2 {
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.card__meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Links/buttons inside a stretched card stay clickable above the overlay. */
.card a:not(.card__link), .card button { position: relative; z-index: 1; }

/* ---- Feature card: tinted icon + title + one line ---- */
.feature-card { gap: var(--sp-2); box-shadow: none; }

.feature-card__icon {
  display: inline-grid;
  place-items: center;
  width: calc(var(--icon-lg) + var(--sp-4));
  height: calc(var(--icon-lg) + var(--sp-4));
  border-radius: var(--r-sm);
  background: var(--primary-tint);
  color: var(--primary);
  font-size: var(--icon-lg);
}

.feature-card__title { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }
.feature-card__text { color: var(--text-muted); }
