/* Vitrines — the glass display case. A card is stone with a hairline
   frame, a brass fitting along the top edge and glass over it; hovering
   lights the case rather than only lifting it. Shared by landing, admin
   and the future portal. Grain comes from marble.css. */

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.6rem;
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--t) var(--ease),
    transform var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

/* Stone grain, laid under the content. Negative z-index inside the
   card's own stacking context puts it over the fill, below the text. */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--marble-grain);
  background-size: 320px 320px;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  pointer-events: none;
}

/* The brass fitting: a hairline at the top edge that runs out to the
   full width of the case as it lights. */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    var(--brass-bright),
    transparent
  );
  transition: width var(--t-slow) var(--ease-out);
  pointer-events: none;
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-deep);
}

.card:hover::after,
.card:focus-within::after {
  width: 100%;
}

/* A vitrine card's heading is h2 under the hero (nothing else sits
   between them) and h3 under a section that has its own h2 — same size
   either way, since the level is about document structure, not scale. */
.card h2,
.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--ink-muted);
  font-size: 0.98rem;
}

@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .card:focus-within {
    transform: none;
  }
  .card::after {
    transition: none;
  }
}
