/* The business card. Everything inside is sized in cqw, so the same card works at any width. */
.card { container-type: inline-size; width: 100%; --accent: #4285f4; }
.card-in {
  position: relative; aspect-ratio: 1.6 / 1; overflow: hidden; border-radius: 4.2cqw; color: #fff;
  background: radial-gradient(120% 150% at 0% 0%, #1d2856 0%, #121a38 52%, #0f162b 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 2cqw 6cqw rgba(0, 0, 0, 0.42);
}
.card-in::before { /* yarn-coloured edge */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1.3cqw; background: var(--accent); z-index: 3;
}

.card-art, .card-ph { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 1; }
.card-art {
  opacity: 0; transition: opacity 1.4s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 48%);
  mask-image: linear-gradient(90deg, transparent 2%, #000 48%);
}
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card.has-art .card-art { opacity: 1; }

.card-ph { display: grid; place-items: center; transition: opacity 0.9s ease; }
.card.has-art .card-ph { opacity: 0; }
.card-ph-in { margin-left: 22cqw; display: grid; justify-items: center; gap: 1.6cqw; }
.card-mono {
  width: 25cqw; height: 25cqw; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 10.5cqw; letter-spacing: -0.02em; color: #0f162b; background: var(--accent);
  box-shadow: 0 0 0 1.4cqw rgba(255, 255, 255, 0.07), 0 0 9cqw color-mix(in srgb, var(--accent) 55%, transparent);
}
.card-wait { font-size: 2.5cqw; font-weight: 500; color: rgba(255, 255, 255, 0.7); opacity: 0; }
.card.painting .card-wait { opacity: 1; animation: card-pulse 1.6s ease-in-out infinite; }
.card.painting .card-mono { animation: card-bob 2.2s ease-in-out infinite; }
@keyframes card-pulse { 50% { opacity: 0.45; } }
@keyframes card-bob { 50% { transform: translateY(-1.2cqw) rotate(-3deg); } }

.card-body {
  position: absolute; inset: 0; width: 66%; z-index: 2; padding: 5.6cqw 0 5.2cqw 6.6cqw;
  display: flex; flex-direction: column; text-shadow: 0 0.2cqw 1.6cqw rgba(15, 22, 43, 0.9);
}
.card-top { font-size: 2.15cqw; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); white-space: nowrap; }
.card-top b { color: var(--yellow, #fbbc04); font-weight: 700; }
.card-mid { margin: auto 0; padding: 1cqw 0; }
.card-name { font-size: var(--name, 8.4cqw); font-weight: 700; line-height: 1.03; letter-spacing: -0.022em; text-wrap: balance; overflow-wrap: anywhere; }
.card-yarn { display: block; width: 17cqw; height: 2.4cqw; margin: 1.9cqw 0 1.7cqw; overflow: visible; }
.card-yarn path { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; }
.card-role { font-size: 3.9cqw; font-weight: 500; line-height: 1.18; }
.card-co { font-size: 3.2cqw; color: rgba(255, 255, 255, 0.68); margin-top: 0.5cqw; line-height: 1.2; }
.card-alias { font-size: 2.9cqw; margin-top: 1.5cqw; color: color-mix(in srgb, var(--accent) 62%, #fff); font-style: italic; min-height: 3.6cqw; }
.card-alias:empty, .card-co:empty { display: none; }
.card-ask {
  align-self: flex-start; max-width: 100%; font-size: 2.7cqw; line-height: 1.2; padding: 1.1cqw 2.4cqw; border-radius: 99cqw;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none;
}
.card-ask b { font-weight: 700; font-size: 0.8em; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); margin-right: 0.6em; }
.card-ask.none { visibility: hidden; }
.card.ghost .card-name, .card.ghost .card-role { opacity: 0.38; }
