/* A contributor's card, usemagpie.ai/c/<id> (cards.js, card.js) */
.cc-top { max-width: 760px; margin: 0 auto; padding: 22px 24px 0; }
.cc-top a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s ease; }
.cc-top a:hover { color: var(--ink); }
:root[data-theme="dark"] .cc-top .bird { filter: invert(1); }
.cc { max-width: 760px; width: 100%; margin: 0 auto; padding: 0 24px 72px; box-sizing: border-box; }
.cc-stage { display: flex; justify-content: center; padding: 44px 0 52px; perspective: 1600px; animation: cc-in .3s cubic-bezier(.23, 1, .32, 1); }
.cc-stage[hidden] { display: none; }
@keyframes cc-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.cc-card {
  /* at rest the card faces the screen; a mouse tilts it, and its edge
     shows as it tilts or turns (card.js) */
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --t: 2px;
  position: relative; width: min(500px, 100%); aspect-ratio: 1000 / 631;
  padding: 0; border: 0; background: none; cursor: pointer; color: inherit;
  border-radius: 3.8% / 6.02%;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .3s cubic-bezier(.23, 1, .32, 1);
  -webkit-tap-highlight-color: transparent;
}
.cc-card.cc-lit { transition-duration: .12s; }
.cc-card:focus-visible { outline: none; }
.cc-card:focus-visible .cc-face { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink3); }
/* the shadow on the ground: narrows as the card goes edge-on, and spreads
   as it lifts to turn (card.js sets --sx, --lift). Held close under the
   card, so it fades out above the buttons, even with the card tilted */
.cc-ground {
  position: absolute; left: 7%; right: 7%; top: 14%; bottom: 1%;
  border-radius: 8% / 14%; background: rgba(0, 0, 0, .42); filter: blur(16px);
  transform: translateZ(-40px) scaleX(var(--sx, 1)); opacity: calc(1 - var(--lift, 0) * .35);
  pointer-events: none;
}
:root[data-theme="dark"] .cc-ground { background: rgba(0, 0, 0, .8); }
/* card.js turns it (rotateY), lifting it on the way */
.cc-flip { position: absolute; inset: 0; transform-style: preserve-3d; }
.cc-face, .cc-edge { position: absolute; inset: 0; border-radius: 3.8% / 6.02%; }
.cc-face {
  overflow: hidden; background: #0d0d0f;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  /* the bevel: a lit top rim, a darker bottom one */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .5);
}
.cc-face canvas { display: block; width: 100%; height: 100%; }
/* the card's thickness: slices of metal between the faces, lit by how far
   the card has turned toward the light (--edge) */
.cc-edge { background: var(--edge, #2a2a2e); transform: translateZ(calc(var(--t) * var(--z, 0))); }
.cc-front { transform: translateZ(var(--t)); }
/* WebKit puts each canvas in a layer of its own that ignores its face's
   backface-visibility, so the side turned away is hidden too (card.js
   swaps them as the card passes edge-on) */
.cc-back { transform: rotateY(180deg) translateZ(var(--t)); visibility: hidden; }
.cc-past .cc-back { visibility: visible; }
.cc-past .cc-front { visibility: hidden; }
/* each face's light as it turns: a shade as it faces away from the light,
   a glare crossing it where the light glances off (--dim, --glare, --gx) */
.cc-shade, .cc-glare { position: absolute; inset: 0; pointer-events: none; }
.cc-shade { background: #000; opacity: var(--dim, 0); }
.cc-glare {
  opacity: var(--glare, 0); mix-blend-mode: screen;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) calc(var(--gx, 50%) - 22%), rgba(255, 255, 255, .5) var(--gx, 50%), rgba(255, 255, 255, 0) calc(var(--gx, 50%) + 22%));
}
.cc-sheen {
  position: absolute; inset: 0; border-radius: 3.8% / 6.02%; pointer-events: none;
  transform: translateZ(calc(var(--t) + 1px));
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .13), rgba(255, 255, 255, 0) 46%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .3s ease;
}
.cc-lit .cc-sheen { opacity: 1; }
.cc-turning .cc-sheen { opacity: 0; transition-duration: .1s; }
@media (hover: hover) and (pointer: fine) {
  .cc-card:active { transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(.985); }
}
@media (prefers-reduced-motion: reduce) {
  .cc-stage { animation-name: cc-fade; }
  .cc-card, .cc-card:active { transform: none; }
  .cc-flip { transform: none !important; }
  .cc-ground { transform: translateZ(-40px); }
  .cc-edge { display: none; }
  .cc-front, .cc-back, .cc-past .cc-front, .cc-past .cc-back { transform: none; visibility: visible; }
  .cc-back { opacity: 0; }
  .cc-face { transition: opacity .2s ease; }
  .cc-flipped .cc-front { opacity: 0; }
  .cc-flipped .cc-back { opacity: 1; }
}
@keyframes cc-fade { from { opacity: 0; } }
/* over the stage, so no shadow of the card ever lies on them */
.cc-acts { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cc-acts .btn { height: 38px; font-size: 14px; padding: 0 16px; }
.cc-acts .btn:active { transform: scale(.97); }
.cc-list { margin-top: 52px; border-top: 1px solid var(--line); padding-top: 28px; }
.cc-list h1 { margin: 0; font-size: 26px; font-weight: 640; letter-spacing: -.01em; }
.cc-list h1 a { color: inherit; text-decoration: none; }
.cc-list h1 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cc-list h1 span { margin-left: 8px; color: var(--ink3); font: 500 15px ui-monospace, "SF Mono", Menlo, monospace; vertical-align: 3px; }
.cc-sub { margin: 8px 0 20px; color: var(--ink2); font-size: 14px; }
.cc-sub strong { color: var(--ink); font-weight: 600; }
.cc-list ul { margin: 0; padding: 0; list-style: none; }
.cc-list li { display: grid; grid-template-columns: auto 1fr; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.cc-list li:first-child { border-top: 0; }
.cc-list li code { margin-right: 12px; color: var(--ink3); font-size: 12.5px; }
.cc-list li a { text-decoration: none; }
.cc-gone { max-width: 560px; margin: 18vh auto; padding: 0 24px; text-align: center; color: var(--ink2); }
@media (max-width: 520px) {
  .cc-stage { padding: 28px 0 42px; }
  .cc-ground { filter: blur(12px); }
  .cc-list h1 { font-size: 22px; }
}
