/* Trifecta Unlocked — Artifact flip-to-reveal card (TU-34, Contract Note
   v1.5). Loaded only on the pages that carry a flip card: /ai-services/,
   /ght-partner/. style.css already defines the outer
   .unlocked-artifact-placement wrap and
   .unlocked-artifact-placement-mount[hidden] — unchanged, not repeated
   here. Front face: Pixel's no-code image. Back face: the revealed code,
   fetched live per contract section 3.12 — never baked in here.
   HO-20261201-1315-forge-cipher-flip-card-unblocked-route-live-tokens-at. */

.unlocked-artifact-card {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  perspective: 1000px;
}

.unlocked-artifact-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .5s;
  transform-style: preserve-3d;
}

/* :not(.no-motion) — the reduced-motion case swaps faces by toggling
   [hidden] in JS instead, so this transform never applies there (spec:
   "no 3D transform", not just no animation). */
.unlocked-artifact-card:not(.no-motion)[aria-pressed="true"] .unlocked-artifact-card-inner {
  transform: rotateY(180deg);
}

.unlocked-artifact-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unlocked-artifact-card-face[hidden] { display: none; }

.unlocked-artifact-card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.unlocked-artifact-card-back {
  transform: rotateY(180deg);
  background: var(--carb);
  border: 1px solid rgba(255, 255, 255, .15);
}

.unlocked-artifact-code {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .05em;
  padding: 0 16px;
  word-break: break-word;
}

.unlocked-artifact-caption {
  font-size: 12px;
  color: var(--alloy);
  margin-top: 8px;
}

.unlocked-artifact-status {
  font-size: 12px;
  color: var(--alloy);
  margin-top: 4px;
  min-height: 1em;
}

/* Screen-reader only: announces the flip itself, which is a visual-only
   effect otherwise (contract section 3.3). */
.unlocked-artifact-sr-announce {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .unlocked-artifact-card-inner { transition: none; }
  .unlocked-artifact-card[aria-pressed="true"] .unlocked-artifact-card-inner {
    transform: none;
  }
}
