/* ModernBizCard card faces + the Card Table. Cards scale with their width (container queries). */
.bc { position: relative; aspect-ratio: 3.5 / 2; width: 100%; border-radius: 3.2%/5.6%; overflow: hidden;
  container-type: inline-size; font-family: var(--font, system-ui, sans-serif); color: var(--ink, #fff);
  background: linear-gradient(135deg, var(--a), var(--b)); isolation: isolate; user-select: none; }
.bc * { box-sizing: border-box; }
.bc-bgimg { position: absolute; inset: 0; background: var(--bgimg) center/cover no-repeat; z-index: -2; }
.bc-dark .bc-bgimg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.15) 100%); }
.bc-light .bc-bgimg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.4) 70%, rgba(255,255,255,.1) 100%); }
.bc-shine { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,.06) 100%); }
/* The card itself is the size container; its layout lives on .bc-in so cqw units measure the CARD's width. */
.bc-in { position: absolute; inset: 0; padding: 7cqw 7cqw 6.2cqw; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto; grid-template-areas: "id mark" ". ." "lines lines"; }
.bc-mark { grid-area: mark; justify-self: end; max-width: 30cqw; height: 15cqw; display: flex; align-items: flex-start; justify-content: flex-end; }
.bc-mark img { max-height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 .4cqw .8cqw rgba(0,0,0,.25)); }
.bc-mark .bc-photo { width: 15cqw; height: 15cqw; border-radius: 50%; object-fit: cover; border: .6cqw solid rgba(255,255,255,.85); }
.bc-mono { width: 14cqw; height: 14cqw; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 5.4cqw; border: .5cqw solid var(--acc); color: var(--ink); letter-spacing: .02em; }
.bc-id { grid-area: id; min-width: 0; }
.bc-name { font-weight: 800; font-size: 7.2cqw; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-title { font-size: 3.6cqw; color: var(--acc); font-weight: 600; margin-top: 1.4cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-company { font-size: 3.6cqw; font-weight: 700; opacity: .82; margin-top: .6cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-rule { width: 11cqw; height: .7cqw; background: var(--acc); border-radius: 1cqw; margin-top: 2.6cqw; }
.bc-lines { grid-area: lines; font-size: 3.15cqw; line-height: 1.5; opacity: .9; min-width: 0; }
.bc-lines div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-lines i { color: var(--acc); margin-right: 1.6cqw; font-size: .92em; }
.bc-light { --ink: #16152a; }
/* layouts */
.bc-centered .bc-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mark" "id" "lines"; text-align: center; }
.bc-centered .bc-mark { justify-self: center; justify-content: center; height: 13cqw; }
.bc-centered .bc-rule { margin-left: auto; margin-right: auto; }
.bc-centered .bc-id { margin-top: 2cqw; }
.bc-split .bc-in { grid-template-columns: 30cqw minmax(0, 1fr); grid-template-areas: "mark id" "mark ." "mark lines"; column-gap: 10cqw; padding-left: 0; }
.bc-split .bc-panel { position: absolute; left: 0; top: 0; bottom: 0; width: 36cqw; background: var(--acc); z-index: -1; }
.bc-split .bc-mark { justify-self: center; align-self: center; justify-content: center; align-items: center; height: 24cqw; max-width: 28cqw; padding-left: 2cqw; }
.bc-split .bc-mono { border-color: var(--ink); }
.bc-split .bc-title { color: inherit; opacity: .9; }
.bc-minimal { background: var(--a); }
.bc-minimal .bc-name { font-weight: 600; letter-spacing: 0; }
.bc-bold .bc-name { font-size: 8.6cqw; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
.bc-bold .bc-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3.2cqw; background: var(--acc); }
.bc-bold .bc-in { padding-bottom: 8.5cqw; }
/* back */
.bc-back { background: var(--back, #fff); color: #16152a; padding: 0; }
.bc-back.bc-dark { color: #fff; }
.bc-back-band { position: absolute; left: 0; right: 0; bottom: 0; height: 3.4cqw; background: linear-gradient(90deg, var(--a), var(--acc)); }
.bc-back-inner { position: absolute; inset: 0 0 3.4cqw 0; display: flex; align-items: center; gap: 5cqw; padding: 0 6cqw; }
.bc-back-inner.noqr { justify-content: center; text-align: center; }
.bc-qr { flex: none; width: 33cqw; height: 33cqw; background: #fff; border-radius: 2.4cqw; padding: 1.6cqw; box-shadow: 0 .6cqw 2cqw rgba(0,0,0,.12); }
.bc-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.bc-back-head { font-weight: 800; font-size: 5cqw; line-height: 1.1; }
.bc-back-body { font-size: 3.1cqw; line-height: 1.45; opacity: .82; margin-top: 1.6cqw; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.bc-back-cta { font-weight: 700; font-size: 3.2cqw; margin-top: 2cqw; color: var(--cta, var(--acc)); }

/* ------------------------------------------------------------------ the Card Table */
.ct-hero { background: radial-gradient(1200px 500px at 70% -10%, rgba(232,152,144,.35), transparent 60%),
  radial-gradient(900px 500px at 0% 0%, rgba(104,96,232,.45), transparent 60%), #100d33; color: #fff; overflow: hidden; position: relative; }
.ct-hero h1 { color: #fff; font-weight: 900; letter-spacing: -.03em; }
.ct-hero .lead { color: #d4d0ff; }
.ct-search { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: .5rem; backdrop-filter: blur(8px); }
.ct-search .form-control, .ct-search .form-select { background: rgba(255,255,255,.95); border: 0; height: 52px; border-radius: 12px; }
.ct-search .btn { height: 52px; border-radius: 12px; font-weight: 800; }
.ct-chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.ct-chip { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px; text-decoration: none;
  background: rgba(255,255,255,.08); color: #ecebff; border: 1px solid rgba(255,255,255,.16); font-weight: 600; font-size: .9rem; transition: all .15s; }
.ct-chip:hover, .ct-chip.active { background: #e89890; color: #161348; border-color: #e89890; }
.ct-chip .n { background: rgba(0,0,0,.2); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.ct-float { position: absolute; width: 230px; transform: rotate(-12deg); right: 6%; top: 18%; opacity: .95; filter: drop-shadow(0 30px 40px rgba(0,0,0,.5)); }
.ct-float.two { width: 200px; transform: rotate(9deg); right: 18%; top: 48%; }
@media (max-width: 991px) { .ct-float { display: none; } }

.ct-table { position: relative; border-radius: 28px; padding: clamp(14px, 3vw, 46px);
  background: url('/static/brand/card-table.jpg') center/cover, #3a2416;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.65), inset 0 0 0 10px rgba(30,16,8,.55), inset 0 0 140px rgba(0,0,0,.55); }
.ct-table::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 30%, rgba(255,214,170,.14), transparent 70%); }
.ct-grid > * { min-width: 0; }
.ct-grid { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); gap: clamp(10px, 2.2vw, 34px); }
@media (max-width: 991px) { .ct-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px) { .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.ct-card { display: block; text-decoration: none; transform: rotate(var(--r, 0deg)); transition: transform .25s cubic-bezier(.2,.8,.2,1), filter .25s;
  filter: drop-shadow(0 10px 10px rgba(0,0,0,.45)) drop-shadow(0 2px 2px rgba(0,0,0,.35));
  animation: ct-deal .55s cubic-bezier(.2,.9,.25,1.15) both; animation-delay: calc(var(--i, 0) * 45ms); }
.ct-card:hover, .ct-card:focus-visible { transform: translateY(-10px) rotate(0deg) scale(1.08); z-index: 5; outline: none;
  filter: drop-shadow(0 26px 24px rgba(0,0,0,.55)) drop-shadow(0 0 22px rgba(232,152,144,.45)); }
@keyframes ct-deal { from { opacity: 0; transform: translate(var(--dx, -40px), -60px) rotate(-14deg) scale(1.08); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ct-card { animation: none; transition: none; } }
.ct-empty-slot { aspect-ratio: 3.5/2; border-radius: 10px; border: 2px dashed rgba(255,220,190,.22); display: flex; align-items: center;
  justify-content: center; color: rgba(255,220,190,.55); font-size: .8rem; text-align: center; padding: .5rem; text-decoration: none; }
.ct-empty-slot:hover { border-color: #e89890; color: #ffd9d3; }
.ct-meta { color: #cfc9ff; font-size: .78rem; margin-top: .45rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.ct-tabs { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.ct-tabs a { min-width: 44px; text-align: center; padding: .45rem .8rem; border-radius: 12px; background: #fff; border: 1px solid var(--mbc-line, #e3e1f6);
  color: #161348; font-weight: 700; text-decoration: none; }
.ct-tabs a.active { background: #161348; color: #fff; }
.ct-cat-tile { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border-radius: 16px; background: #fff; border: 1px solid #e3e1f6;
  text-decoration: none; color: #161348; transition: all .15s; height: 100%; }
.ct-cat-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(22,19,72,.12); border-color: #c8c3f7; color: #161348; }
.ct-cat-tile .ic { width: 46px; height: 46px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #161348, #524ad1); color: #fff; font-size: 1.25rem; }
.ct-cat-tile .cnt { color: #5f5c7e; font-size: .82rem; }

/* full view with flip */
.cv-stage { background: radial-gradient(900px 500px at 50% 0%, rgba(104,96,232,.35), transparent 60%), #0c0a24; min-height: 100vh; color: #fff; }
.cv-flip { perspective: 1800px; width: min(92vw, 760px); margin: 0 auto; cursor: pointer; }
.cv-inner { position: relative; transition: transform .8s cubic-bezier(.3,.9,.3,1); transform-style: preserve-3d; }
.cv-flip.flipped .cv-inner { transform: rotateY(180deg); }
.cv-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; filter: drop-shadow(0 40px 50px rgba(0,0,0,.6)); }
.cv-face.back { position: absolute; inset: 0; transform: rotateY(180deg); }
.cv-btn { border-radius: 14px; font-weight: 700; }

/* Perk Miner cards (from perkminer.com) */
.bc-pm { position: absolute; right: 4.5cqw; bottom: 4.5cqw; z-index: 4; font: 700 2.6cqw/1 system-ui, sans-serif; letter-spacing: .02em;
  padding: 1.3cqw 2.4cqw; border-radius: 99cqw; background: linear-gradient(135deg, #ffd66b, #e0a800); color: #1e4a4b;
  box-shadow: 0 .5cqw 1.5cqw rgba(0,0,0,.3); }
.ct-pm-hero { background: radial-gradient(900px 400px at 85% 0%, rgba(255,214,107,.28), transparent 60%),
  radial-gradient(700px 400px at 0% 0%, rgba(42,88,89,.6), transparent 60%), #0f2526; }
.ct-pm-tile { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; padding: 1.4rem 1.6rem; border-radius: 22px; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #1e4a4b, #2a5859 55%, #3a6d6e); box-shadow: 0 20px 40px -18px rgba(30,74,75,.7);
  border: 1px solid rgba(255,214,107,.35); transition: transform .15s; }
.ct-pm-tile:hover { color: #fff; transform: translateY(-3px); }
.ct-pm-tile img { height: 46px; }
.ct-pm-tile .gold { color: #ffd66b; }
