/* The gift card (docs/plans/GIFT-CARDS.md). One layout over every design picture (public/img/giftcards/<design>.svg):
   a big holographic Monroe's logo, amount, names, code and expiry; the foil moves with the phone's tilt or a finger, and a scratch
   panel over the PIN. Bank-card shape (85.6 x 54 mm). Fonts: the site's Poppins; the code in a monospace so it reads
   character by character. */
.gc { container-type: inline-size; --gc-x: 50%; --gc-y: 50%; --gc-a: 0deg; position: relative; width: 100%; max-width: 428px; aspect-ratio: 856 / 540;
  border-radius: 4.2% / 6.6%; overflow: hidden; color: #fff; font-family: "Poppins", system-ui, sans-serif; isolation: isolate;
  box-shadow: 0 18px 40px -18px #000a, 0 2px 6px #0004; transform: perspective(900px) rotateX(var(--gc-rx, 0deg)) rotateY(var(--gc-ry, 0deg));
  transition: transform .5s cubic-bezier(.2,.8,.2,1); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gc.gc-live { transition: transform .08s linear; }
.gc-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.gc-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, #000a 0%, #0006 34%, #0000 58%); }
.gc-in { position: absolute; inset: 0; padding: 5.5% 6%; display: grid; grid-template-rows: auto 1fr auto; }
.gc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
/* The Monroe's logo IS the hologram (Paul, 18 Nov): the logo's shape cut from a rainbow foil that slides with the tilt.
   The page sets --gc-logo to the logo picture (white on clear). The wrapper carries the shadow (a mask would cut it off). */
.gc-logo-wrap { width: 56%; filter: drop-shadow(0 2px 3px #000a); }
.gc-logo { width: 100%; aspect-ratio: 1281 / 481; -webkit-mask: var(--gc-logo) center / contain no-repeat; mask: var(--gc-logo) center / contain no-repeat;
  background:
    radial-gradient(circle at var(--gc-x) var(--gc-y), #fffe 0%, #fff0 30%),
    linear-gradient(calc(105deg + var(--gc-a) / 3), #fff 0%, #ffe9a8 12%, #ff8fe0 26%, #9fe8ff 40%, #a8ffcf 54%, #fff3a8 68%, #ffb0ec 82%, #fff 100%);
  background-size: 100% 100%, 320% 320%; background-position: 0 0, var(--gc-x) var(--gc-y); }
.gc-kind { font-size: clamp(8px, 2.3cqw, 11px); letter-spacing: .18em; font-weight: 600; text-transform: uppercase; opacity: .9; margin-top: 4px; }
.gc-amount { font-weight: 700; font-size: clamp(22px, 10cqw, 48px); line-height: 1; text-shadow: 0 2px 8px #0009; font-variant-numeric: tabular-nums; }
.gc-amount small { font-size: .45em; vertical-align: .9em; margin-right: 1px; }
.gc-left .gc-top { display: grid; justify-content: start; gap: 4px; }
.gc-left .gc-logo-wrap { width: 46cqw; }
.gc-left .gc-amount { font-size: clamp(18px, 7.5cqw, 36px); }  /* a design whose picture fills the right: the amount joins the left column */
.gc-names { align-self: center; font-size: clamp(10px, 3.2cqw, 15px); line-height: 1.35; max-width: 55%; text-shadow: 0 1px 4px #000c; }
.gc-names b { font-weight: 600; }
.gc-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.gc-code { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; letter-spacing: .06em;
  font-size: clamp(11px, 4.2cqw, 20px); text-shadow: 0 1px 3px #000c; white-space: nowrap; }
.gc-valid { font-size: clamp(8px, 2.4cqw, 11px); letter-spacing: .06em; opacity: .9; margin-top: 2px; text-shadow: 0 1px 3px #000c; }
/* The sheen over the whole card: faint, moving with the tilt; full colour only where the light falls. */
.gc-holo { position: absolute; inset: 0; pointer-events: none; z-index: 1; mix-blend-mode: color-dodge; opacity: .45;
  background:
    radial-gradient(circle at var(--gc-x) var(--gc-y), #fff9 0%, #fff0 38%),
    repeating-linear-gradient(calc(115deg + var(--gc-a) / 6), #ff6ad520 0 8%, #ffd36a20 8% 16%, #6affb820 16% 24%, #6ad9ff20 24% 32%, #b56aff20 32% 40%);
  background-size: 100% 100%, 260% 260%; background-position: 0 0, var(--gc-x) var(--gc-y); }
@media (prefers-reduced-motion: reduce) { .gc { transform: none !important; transition: none; } }

/* The PIN: a silver panel to scratch, with a button for anyone who cannot or would rather not. */
.gc-pin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gc-pin-box { position: relative; width: 168px; height: 56px; border-radius: 10px; background: #fff; color: #111;
  display: grid; place-items: center; font: 700 28px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .3em;
  box-shadow: inset 0 0 0 1px #0002; overflow: hidden; }
.gc-pin-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; border-radius: 10px; }
.gc-pin-box.gc-done canvas { opacity: 0; transition: opacity .4s; pointer-events: none; }
.gc-pin-label { font: 500 13px/1.3 "Poppins", system-ui, sans-serif; }
