/* CARD SLABS — glass project cards, badges. Split from styles.css.
   cinema.css (loaded after) overrides backgrounds with gradient borders. */

.list { display: flex; flex-direction: column; gap: 12px; }

a.card {
  position: relative;
  display: grid;
  /* index | glyph | body(1fr) | arrow — body takes the slack so text sits flush by the sigil */
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  min-height: 72px;
  background:
    linear-gradient(135deg, rgba(95,180,196,0.04), rgba(0,0,0,0.18)),
    var(--surface);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  touch-action: manipulation;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    background 280ms ease,
    border-color 280ms ease,
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 280ms ease;
  overflow: hidden;
  will-change: transform;
}

/* sheen — moves with cursor */
a.card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle 180px at var(--mx, 50%) var(--my, 50%),
    rgb(var(--accent-rgb) / 0.16) 0%,
    transparent 50%);
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}

/* edge highlight — thin shimmer on top edge */
a.card::after {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}

a.card:hover {
  background:
    linear-gradient(135deg, rgba(95,180,196,0.10), rgba(0,0,0,0.18)),
    var(--surface-hi);
  border-color: var(--border-hi);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.65),
    0 0 0 1px var(--glow),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
a.card:hover::before { opacity: 1; }
a.card:hover .glyph {
  filter: drop-shadow(0 0 14px var(--glow));
  animation: glyph-breath 1600ms ease-in-out infinite;
}
a.card:hover .glyph circle.ring { stroke: var(--accent); }

@keyframes glyph-breath {
  0%, 100% { transform: scale(1)    rotate(0deg); }
  50%      { transform: scale(1.10) rotate(-2deg); }
}

.card-index {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  width: 22px;
  text-align: center;
  transition: color 280ms ease;
}
a.card:hover .card-index { color: var(--accent-warm); }

.glyph {
  width: 36px;
  height: 36px;
  stroke-width: 1.2;
  transform-origin: center;
  transition: filter 280ms ease;
}
.glyph circle.ring { stroke: var(--text-dim); transition: stroke 280ms ease; }

.body {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 2px;
}
.title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  white-space: nowrap;
}
.url {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: rgba(220, 232, 245, 0.78);
  font-style: italic;
  line-height: 1.4;
}
.arrow {
  color: var(--text-faint);
  transition: color 280ms ease, transform 280ms ease;
  font-family: 'Cinzel', serif;
  font-size: 18px;
}
a.card:hover .arrow { color: var(--accent); transform: translateX(5px); }

/* "Coming soon" placeholder cards — muted, no tilt, soft badge */
a.card.coming { opacity: 0.68; cursor: default; }
a.card.coming:hover {
  background:
    linear-gradient(135deg, rgba(95,180,196,0.04), rgba(0,0,0,0.18)),
    var(--surface);
  border-color: var(--border);
  box-shadow: none;
  transform: perspective(900px) rotateX(0) rotateY(0);
}
a.card.coming:hover .glyph { filter: none; animation: none; }
a.card.coming:hover .arrow { transform: none; color: var(--text-faint); }
a.card.coming .arrow { display: none; }

/* badge styles live in chapters.css (200-line budget) */

/* cards without index column drop the column gracefully */
a.card:not(.has-index) { grid-template-columns: auto 1fr auto; }
a.card:not(.has-index) .card-index { display: none; }

/* signal cards: contacts, single line layout (no note) */
[data-section="signal"] a.card { min-height: 64px; padding: 14px 22px; }

a.card:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 18px;
}
summary { outline: none; }

@media (max-width: 540px) {
  a.card { padding: 14px 16px; gap: 14px; min-height: 64px; }
  .glyph { width: 32px; height: 32px; }
  .body { grid-template-columns: 1fr; row-gap: 1px; }
  .title { font-size: 15px; white-space: normal; }
  .url { font-size: 10.5px; white-space: normal; word-break: break-all; }
  .note { font-size: 11px; }
  .card-index { width: 18px; font-size: 10px; }
}
