/* Store credit: a card of clear glass over a moving field of soft colour (periwinkle since 15 November 2026;
   the ground, the shadows' tint and the chip's shadow are written by product-ui/scripts/beyond-tone.py).
   One source for the homepage tile and for the `h-credit` Stageshow scene
   (product-ui/src/home.tsx), which films the poster the page shows first.
   Markup is built by store-credit-card.js; lengths are the scene's own
   design pixels (384 x 300), scaled to the tile by --scc-k. */
.scc { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: #f1f4fe; opacity: 0; transition: opacity .6s ease; --scc-k: 1; --scc-rx: 0; --scc-ry: 0; --scc-h: 0; }
.scc.is-live { opacity: 1; }
.scc.is-still { transition: none; }
/* Outside the card the field is only hinted at; the card is where it shows in full (as on Stripe's card) */
.scc__ground { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: .4; }
.scc__fit { position: absolute; left: 0; top: 0; width: 384px; height: 300px; transform: scale(var(--scc-k)); transform-origin: 0 0; }

/* The card: ISO proportions and corners, straight at rest. It turns to face the pointer.
   Its shadow is the faint one clear glass throws, tinted by the field, falling away from
   the light at the upper left. */
.scc__card {
  position: absolute; left: 32px; top: 50px; width: 320px; height: 202px; border-radius: 14px; color: #111111d1;
  transform: perspective(900px) rotateX(calc(var(--scc-rx) * 1deg)) rotateY(calc(var(--scc-ry) * 1deg)) scale(calc(1 + var(--scc-h) * .015));
  box-shadow:
    calc(1px - var(--scc-ry) * .2px) calc(2px + var(--scc-rx) * .15px) 5px -1px #2a328833,
    calc(6px - var(--scc-ry) * 1px) calc(16px + var(--scc-rx) * .8px + var(--scc-h) * 8px) calc(28px + var(--scc-h) * 14px) -12px #2a328866;
  will-change: transform;
}
.scc__card > * { position: absolute; }

/* The card's face: its own copy of the field at full strength, under a faint veil of light.
   No border, rim or bevel runs round the card (the user's wish): its edge is where the full
   colour stops, and its shadow. The copy is redrawn on every frame by the script, because a
   backdrop filter breaks up in Chromium once the card is turned in 3D. */
.scc__pane { inset: 0; border-radius: inherit; overflow: hidden; }
.scc__pane > canvas { position: absolute; display: block; max-width: none; }
.scc__pane::after { content: ''; position: absolute; inset: 0; background: linear-gradient(128deg, #ffffff38 0%, #ffffff0f 44%, #ffffff1f 100%); }

/* Anatomy, and nothing else: chip, contactless mark, network mark, 24px from the card's edges.
   Each rides a little above the glass. */
.scc__chip {
  left: 24px; top: 66px; width: 44px; height: 33.7px;
  background: url(product-ui/assets/card/chip.svg?v=2) center / contain no-repeat;
  transform: translate(calc(var(--scc-ry) * .2px), calc(var(--scc-rx) * -.2px));
  filter: drop-shadow(0 1px 1.5px #1c226047);
}
.scc__waves {
  left: 80px; top: 71.9px; width: 15.2px; height: 22px; background: currentColor;
  -webkit-mask: url(product-ui/assets/card/contactless.svg) center / contain no-repeat;
  mask: url(product-ui/assets/card/contactless.svg) center / contain no-repeat;
  transform: translate(calc(var(--scc-ry) * .12px), calc(var(--scc-rx) * -.12px));
}
.scc__mark {
  right: 24px; bottom: 24px; width: 56px; height: 43.5px;
  background: url(product-ui/assets/card/mastercard.svg) center / contain no-repeat;
  transform: translate(calc(var(--scc-ry) * .28px), calc(var(--scc-rx) * -.28px));
}
