/* ============================================================
   3D card deck — vertical cylinder carousel for the apply panel.
   Ported from the "animated-cards" scene to this stack: no React,
   no Tailwind, no CDN. The moving gradient replaces the video,
   the brand palette replaces the black/rainbow set, and every
   transform is done in one rAF loop (see deck3d.js).
   ============================================================ */

.deck{
  position:relative;
  width:100%;
  height:380px;
  margin:18px 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  perspective:1350px;
  perspective-origin:50% 45%;
  overflow:hidden;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 20%,#000 80%,transparent 100%);
          mask-image:linear-gradient(180deg,transparent 0,#000 20%,#000 80%,transparent 100%);
  z-index:0;
  pointer-events:none;
}
.deck::after{display:none}

.deck__stage{
  position:relative;
  transform-style:preserve-3d;
  will-change:transform;
}

.deck__card{
  position:absolute;
  inset:0;
  transform-style:preserve-3d;
  backface-visibility:visible;
  will-change:transform;
}

/* ---------- volume: thin slabs stacked on Z ---------- */
.deck__slab{
  position:absolute;
  inset:0;
  border-radius:14px;
  background:#B9BFCB;
  border:1px solid #8E96A6;
  pointer-events:none;
}

/* ---------- faces ---------- */
.deck__face{
  position:absolute;
  inset:0;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.18);
  backface-visibility:hidden;
  background:#0D1740;
}

/* front: the foil is the "video" — one slow travelling gradient */
.deck__face--front::before{
  content:"";
  position:absolute;
  inset:-30%;
  background:
    radial-gradient(120% 90% at 78% 8%,rgba(224,168,26,.42),transparent 58%),
    conic-gradient(from 210deg at 30% 120%,#0C1633 0deg,#16235C 70deg,#1E3070 130deg,#101D4A 200deg,#0C1633 300deg,#16235C 360deg);
  background-size:180% 180%,140% 140%;
  animation:deckFoil 18s linear infinite;
}
.deck__face--front::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(112deg,transparent 34%,rgba(255,255,255,.22) 46%,rgba(255,244,214,.5) 50%,rgba(255,255,255,.18) 54%,transparent 66%);
  transform:translateX(-30%);
  animation:deckSheen 7.5s cubic-bezier(.4,0,.2,1) infinite;
  mix-blend-mode:screen;
  opacity:.55;
}
@keyframes deckFoil{
  0%{background-position:0% 0%,0% 0%}
  50%{background-position:60% 40%,40% 60%}
  100%{background-position:0% 0%,0% 0%}
}
@keyframes deckSheen{
  0%{transform:translateX(-38%)}
  55%,100%{transform:translateX(42%)}
}

.deck__chip{
  position:absolute;
  left:18px;top:50%;
  width:34px;height:26px;
  margin-top:-13px;
  border-radius:5px;
  background:linear-gradient(145deg,#F6E7B0,#C79E63 55%,#F3D89A);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),0 1px 2px rgba(0,0,0,.35);
}
.deck__chip::before,
.deck__chip::after{
  content:"";
  position:absolute;
  left:6px;right:6px;
  height:1px;
  background:rgba(90,64,20,.4);
}
.deck__chip::before{top:9px}
.deck__chip::after{top:16px}

.deck__brand{
  position:absolute;
  left:18px;top:16px;
  font:700 8.5px/1 var(--font);
  letter-spacing:.2em;
  color:rgba(255,255,255,.92);
  text-transform:uppercase;
}
.deck__band{
  position:absolute;
  left:18px;bottom:16px;
  font:700 15px/1 var(--mono);
  letter-spacing:.02em;
  color:#fff;
  font-variant-numeric:tabular-nums;
}
.deck__dots{
  position:absolute;
  right:16px;bottom:14px;
  display:flex;
}
.deck__dots i{
  width:16px;height:16px;border-radius:50%;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.18);
}
.deck__dots i + i{margin-left:-6px;background:rgba(255,255,255,.34)}

/* back: same foil, blurred, plus a magnetic stripe and the data */
.deck__face--back{
  transform:rotateX(180deg);
}
.deck__face--back::before{
  content:"";
  position:absolute;
  inset:-18%;
  background:
    radial-gradient(100% 80% at 20% 10%,rgba(224,168,26,.28),transparent 60%),
    linear-gradient(150deg,#0C1633,#16235C 60%,#0C1633);
  filter:blur(14px);
}
.deck__stripe{
  position:absolute;
  left:0;right:0;top:22px;
  height:30px;
  background:rgba(4,8,20,.9);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.deck__data{
  position:absolute;
  left:16px;bottom:16px;
  display:grid;
  gap:3px;
  font-family:var(--mono);
  text-align:left;
}
.deck__data b{
  font:500 11px/1 var(--mono);
  letter-spacing:.14em;
  color:#fff;
}
.deck__data span{
  font:500 8px/1.2 var(--mono);
  letter-spacing:.08em;
  color:rgba(255,255,255,.66);
  text-transform:uppercase;
}

/* static case: reduced motion, or a browser without 3D transforms */
.deck.is-static{perspective:none;height:auto;padding:0;-webkit-mask-image:none;mask-image:none}
.deck.is-static .deck__stage{position:relative;transform:none!important;width:100%;max-width:330px;height:auto;margin:0 auto}
.deck.is-static .deck__card{position:relative;inset:auto;height:auto;transform:none!important;visibility:visible!important}
.deck.is-static .deck__card + .deck__card{display:none}
.deck.is-static .deck__slab{display:none}
.deck.is-static .deck__face{position:relative;aspect-ratio:1.586;height:auto}
.deck.is-static .deck__face--back{display:none}
.deck.is-static .deck__face--front::before,
.deck.is-static .deck__face--front::after{animation:none}

@media (max-width:1099.98px){
  .deck{height:300px}
}
@media (max-height:840px){
  .deck{height:320px}
}
@media (max-width:767.98px){
  .deck{display:none}
}
@media (prefers-reduced-motion:reduce){
  .deck__face--front::before,
  .deck__face--front::after{animation:none}
}
