/* TOQUIA Cinematic — pass replicas (Apple Wallet store card, Google Wallet loyalty card) and premium phones.
   Every size is relative to the pass width (container query units), so one design scales from 140px to 360px. */

[data-pass] { container-type: inline-size; }

.pass {
  --pass-radius: 4cqi;
  position: relative;
  width: 100%;
  background: var(--pass-bg);
  color: var(--pass-fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.15;
  border-radius: var(--pass-radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 18px 40px -18px rgba(0,0,0,.6);
  transition: box-shadow .5s var(--ease-out);
}
.pass small { display: block; font-size: 2.9cqi; font-weight: 600; letter-spacing: .04em; opacity: .82; }
.pass b { display: block; font-weight: 500; }

/* ── Apple store card ───────────────────────────────── */
.pass-apple { padding-bottom: 4.5cqi; }
.pass-top {
  display: flex;
  align-items: center;
  gap: 2.6cqi;
  padding: 4cqi 4.5cqi 3.4cqi;
}
.pass-logo, .g-logo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 9cqi;
  height: 9cqi;
  border-radius: 50%;
  background: var(--mono-bg);
  color: var(--mono-fg);
  font-size: 3.4cqi;
  font-weight: 800;
  letter-spacing: -.02em;
}
.pass-logotext { font-size: 4.9cqi; font-weight: 600; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-right { text-align: right; }
.pf-right b { font-size: 4.6cqi; }
.pass-strip { display: block; width: 100%; height: auto; aspect-ratio: 375 / 123; }
.pass-fields {
  display: flex;
  justify-content: space-between;
  gap: 4cqi;
  padding: 3.6cqi 4.5cqi 0;
}
.pass-fields b { font-size: 5cqi; margin-top: .6cqi; }
.pf-reward { text-align: right; min-width: 0; }
.pf-reward b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass-code {
  display: grid;
  justify-items: center;
  gap: 1.4cqi;
  width: fit-content;
  margin: 5cqi auto 0;
  padding: 3cqi 3cqi 2cqi;
  background: #fff;
  border-radius: 2.2cqi;
  color: #1c1c1e;
}
.pass-code small { font-size: 2.6cqi; font-weight: 500; letter-spacing: 0; opacity: 1; }
.code-qr { width: 30cqi; height: 30cqi; }
.code-128 { width: 52cqi; height: 13cqi; }

/* Stamps (SVG) — filled state is a class so the change can animate */
.st .st-c { fill: transparent; transition: fill .35s var(--ease-out); }
.st.on .st-c { fill: var(--fill); }
.st .st-mark { opacity: 0; font-family: inherit; font-weight: 800; transition: opacity .3s; }
.st.on .st-mark { opacity: 1; }
.st { transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.st.pop { transform: scale(1.22); }
.bar-fill { transition: transform .6s var(--ease-out); }

/* Reward available: warm gold edge (the pass itself only changes its label in production) */
.pass.has-reward { box-shadow: 0 0 0 1.2cqi rgba(228,182,60,.55), 0 0 18cqi rgba(228,182,60,.35), 0 18px 40px -18px rgba(0,0,0,.6); }

/* ── Google loyalty card ────────────────────────────── */
.pass-google { --pass-radius: 6cqi; padding-top: 4.5cqi; }
.g-top { display: flex; align-items: center; gap: 2.6cqi; padding: 0 5cqi; font-size: 4.2cqi; font-weight: 500; }
.g-title { padding: 3cqi 5cqi 1cqi; font-size: 7cqi; font-weight: 500; line-height: 1.1; }
.g-row { display: flex; gap: 10cqi; padding: 2.4cqi 5cqi 0; }
.g-row b { font-size: 5cqi; margin-top: .6cqi; }
.pass-google small { font-weight: 500; letter-spacing: .01em; }
.g-code { margin-top: 5cqi; margin-bottom: 5cqi; }
.g-hero { aspect-ratio: 3 / 1; background-size: cover; background-position: center; }

/* ── Premium phones (generic devices, no brand marks) ─ */
.phone {
  --phone-w: 240px;
  position: relative;
  width: var(--phone-w);
  aspect-ratio: 9 / 19.5;
  padding: calc(var(--phone-w) * .03);
  border-radius: calc(var(--phone-w) * .16);
  background:
    linear-gradient(145deg, #3a3f3d 0%, #121514 38%, #0a0c0b 62%, #2f3432 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.14),
    inset 0 0 0 calc(var(--phone-w) * .012) #050606,
    0 40px 80px -30px rgba(0,0,0,.85),
    0 0 0 1px rgba(var(--accent-rgb),.18),
    0 0 60px -10px rgba(var(--accent-rgb),.28);
  transform-style: preserve-3d;
}
.phone::after {
  /* Rim light sweeping across the frame */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 46%, transparent 58%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: calc(var(--phone-w) * .13);
  background: radial-gradient(120% 80% at 50% 0%, #1b1f1e, #050606 70%);
  transform-style: preserve-3d;
  container-type: inline-size;
}
.phone-android .phone-screen { background: radial-gradient(120% 80% at 50% 0%, #232726, #111312 70%); }
.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4.5cqi 9cqi 0;
  font-size: 5cqi;
  font-weight: 600;
  color: #f2f2f2;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}
.phone-island { width: 30cqi; height: 9cqi; border-radius: 99px; background: #000; }
.phone-camera { width: 6cqi; height: 6cqi; border-radius: 50%; background: #000; box-shadow: 0 0 0 1px #222; }
.phone-pass {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 15%;
  transform-style: preserve-3d;
  will-change: transform;
}
.phone-notice {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 4%;
  z-index: 3;
  display: grid;
  gap: 1cqi;
  padding: 3.5cqi 4.5cqi;
  border-radius: 6cqi;
  background: rgba(40,44,43,.94);
  color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 4.4cqi;
  line-height: 1.25;
  opacity: 0;
  transform: translateZ(150px) translateY(-14px) scale(.96);   /* stays above a pass that lifts out of the screen */
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out);
  pointer-events: none;
}
.phone-notice b { font-weight: 600; }
.phone-notice.is-on { opacity: 1; transform: translateZ(150px); }

.stage-caption {
  position: absolute;
  right: 0;
  bottom: -1.8rem;
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-muted);
  opacity: .8;
}
.stage-caption { color: var(--ink-muted); }

/* Mid/low tier: lighter shadows (large blurred shadows are repainted while 3D layers move) */
[data-tier="mid"] .pass, [data-tier="low"] .pass { box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
[data-tier="mid"] .phone, [data-tier="low"] .phone {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 24px 40px -24px rgba(0,0,0,.85), 0 0 0 1px rgba(var(--accent-rgb),.18);
}

/* Reward conversion pulse: the stamps become the reward, the reward field lights up gold. */
.pass.is-banking .pf-reward { animation: tq-bank .9s var(--ease-out, ease-out); }
.pass.is-banking .st { animation: tq-stamp-out .5s ease-in; }
@keyframes tq-bank { 0% { transform: scale(1); } 35% { transform: scale(1.12); color: #f2cf6b; text-shadow: 0 0 1.4cqi rgba(228,182,60,.9); } 100% { transform: scale(1); } }
@keyframes tq-stamp-out { 0% { opacity: .35; transform: translateY(0) scale(1); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pass.is-banking .pf-reward, .pass.is-banking .st { animation: none; } }
