/* x-Partner Holding — folha do cartão.
   Clareza Apple/Google em fundo claro, cartão em metal e o 3D sem biblioteca. */

:root {
  --bg: #f6f5f3;
  --paper: #ffffff;
  --ink: #1c1b1a;
  --ink-2: #6b6862;
  --line: #e4e2de;
  --brand: #ff4000;
  --ok: #0a8a4a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 18, 15, .05), 0 10px 30px rgba(20, 18, 15, .08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 78% -8%, #fff7f2 0%, transparent 60%),
    radial-gradient(900px 520px at 6% 4%, #f0f4ff 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 520px; margin: 0 auto; padding: 26px 18px 60px; }

/* ── cartão ───────────────────────────────────────────────────────── */
.stage { perspective: 1500px; perspective-origin: 50% 30%; }

.card3d {
  position: relative;
  aspect-ratio: 856 / 540;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .35s cubic-bezier(.22, .68, .28, 1);
  will-change: transform;
}

.lift {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(var(--lift, 0px));
  transition: transform .35s cubic-bezier(.22, .68, .28, 1);
}

.face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px;
  color: #fff;
}

.face.front {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 88%, #000) 0%, var(--brand) 42%, color-mix(in srgb, var(--brand) 55%, #fff) 100%);
}

.face.back {
  transform: rotateY(180deg);
  background: linear-gradient(140deg, #201f1d 0%, #2c2a27 55%, #191817 100%);
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
}

/* lâmina holográfica que acompanha o inclinar */
.foil {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from calc(var(--ang, 0deg) * 1deg),
    rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, .34) 24deg, rgba(120, 220, 255, .22) 58deg,
    rgba(255, 255, 255, 0) 96deg, rgba(255, 210, 120, .2) 150deg, rgba(255, 255, 255, .3) 190deg,
    rgba(255, 255, 255, 0) 250deg);
  mix-blend-mode: soft-light;
  transform: translate3d(calc(var(--px, 0) * 26px), calc(var(--py, 0) * 26px), 0) rotate(calc(var(--ang, 0deg) / 4));
  pointer-events: none;
}

/* brilho especular na posição do dedo/mouse */
.glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at calc(50% + var(--px, 0) * 46%) calc(50% + var(--py, 0) * 46%),
    rgba(255, 255, 255, .48), rgba(255, 255, 255, .06) 42%, transparent 66%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* varredura contínua, lenta, de cartão físico */
.sheen {
  position: absolute;
  top: -60%;
  left: -30%;
  width: 42%;
  height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: rotate(8deg) translateX(var(--sweep, -40%));
  opacity: .5;
  mix-blend-mode: soft-light;
  pointer-events: none;
  animation: sweep 7.5s ease-in-out infinite;
}

@keyframes sweep {
  0%, 62% { transform: rotate(8deg) translateX(-60%); }
  92%, 100% { transform: rotate(8deg) translateX(360%); }
}

.row1 { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 2; }

.face-avatar {
  width: 54px; height: 54px; border-radius: 16px; object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28); background: rgba(255, 255, 255, .18);
}

.waves { width: 26px; height: 26px; opacity: .9; }
.waves path { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }

.face-name { position: relative; z-index: 2; display: grid; gap: 2px; text-shadow: 0 1px 8px rgba(0, 0, 0, .22); }
.face-name strong { font-size: 23px; font-weight: 650; letter-spacing: -.02em; }
.face-name span { font-size: 13.5px; opacity: .88; font-weight: 500; }

.face-brand {
  position: absolute; right: 22px; bottom: 18px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .72;
}

.back-chip {
  width: 44px; height: 34px; border-radius: 7px; margin-top: 4px; flex: none;
  background: linear-gradient(140deg, #f6d77a, #c99a35 46%, #f2e2a8 74%, #b98a2c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
  position: relative;
}
.back-chip::after {
  content: ""; position: absolute; inset: 6px 8px;
  border-left: 1px solid rgba(0, 0, 0, .22); border-right: 1px solid rgba(0, 0, 0, .22);
}

.back-lines { flex: 1; display: grid; gap: 5px; align-content: start; position: relative; z-index: 2; }
.bl { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; border-bottom: 1px solid rgba(255, 255, 255, .14); padding-bottom: 4px; }
.bl span { opacity: .55; text-transform: uppercase; letter-spacing: .08em; font-size: 9.5px; }
.bl b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }

.back-qr { width: 108px; height: 108px; border-radius: 10px; background: #fff; padding: 6px; flex: none; align-self: flex-end; position: relative; z-index: 2; }

.flip {
  margin: 14px auto 0; display: block; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-2); font: 600 13px var(--font); padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.flip:active { transform: translateY(1px); }

/* ── identidade e blocos ──────────────────────────────────────────── */
.idblk { margin-top: 24px; }
.idblk h1 { margin: 0; font-size: 27px; letter-spacing: -.028em; line-height: 1.2; font-weight: 680; }
.role { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.bio { margin: 12px 0 0; color: #3b3934; }

.seals { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.seal {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  color: var(--ok); background: #eaf7ef; border: 1px solid #cfeadb; padding: 4px 10px; border-radius: 999px;
}
.seal i { font-size: 14px; }

.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; margin: 22px 0 6px; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: 600 14.5px var(--font);
  text-decoration: none; cursor: pointer; transition: box-shadow .16s, transform .16s;
}
.act:hover { box-shadow: var(--shadow); }
.act:active { transform: translateY(1px); }
.act i { font-size: 17px; }
.act.prim { background: var(--brand); border-color: transparent; color: #fff; }
.act.wide { width: 100%; }

.blk { margin-top: 28px; }
.blk h3 {
  margin: 0 0 12px; font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 700;
}

.lks { display: grid; gap: 8px; }
.lk {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 550;
}
.lk i { color: var(--ink-2); }
.soc-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.soc {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 19px; text-decoration: none;
}
.soc:hover { border-color: var(--brand); color: var(--brand); }

.its { display: grid; gap: 10px; }
.it { display: flex; gap: 12px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.it img, .it-ph { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; flex: none; background: #efeeea; }
.it-ph { display: grid; place-items: center; color: #b6b2ab; font-size: 22px; }
.it b { font-size: 15px; }
.it p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.pr { display: inline-block; margin-left: 8px; font-size: 13px; font-weight: 700; color: var(--brand); }

.addr { display: flex; gap: 9px; align-items: center; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: 13px 15px; border-radius: 14px; }

/* ── chat do agente ───────────────────────────────────────────────── */
.agent h3 i { color: var(--brand); }
.chatlog { display: grid; gap: 9px; margin-bottom: 12px; }
.msg { padding: 11px 14px; border-radius: 16px; max-width: 86%; white-space: pre-wrap; font-size: 14.5px; }
.msg.ai { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { background: var(--brand); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; }
.msg.thin { opacity: .6; font-size: 13.5px; }
.ask { display: flex; gap: 8px; }
.ask input {
  flex: 1; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line);
  font: 15px var(--font); background: var(--paper); color: inherit;
}
.ask input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
.ask button { width: 48px; border-radius: 14px; border: 0; background: var(--brand); color: #fff; font-size: 17px; cursor: pointer; }

/* ── folha do Pix ─────────────────────────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: end center;
  background: rgba(28, 27, 26, .42); backdrop-filter: blur(7px);
}
.sheet[hidden] { display: none; }
.sheet-in {
  position: relative; width: min(480px, 100%); background: var(--paper);
  border-radius: 22px 22px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  animation: up .26s cubic-bezier(.22, .68, .28, 1);
}
@keyframes up { from { transform: translateY(28px); opacity: .4; } }
.sheet-in h3 { margin: 0 0 16px; font-size: 19px; letter-spacing: -.01em; text-transform: none; color: var(--ink); font-weight: 680; }
.shut { position: absolute; top: 14px; right: 14px; border: 0; background: #f1efec; width: 32px; height: 32px; border-radius: 50%; font-size: 17px; cursor: pointer; }
.amt { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; margin-bottom: 14px; }
.amt span { color: var(--ink-2); font-weight: 600; }
.amt input { border: 0; font: 600 22px var(--font); width: 100%; outline: 0; background: transparent; color: inherit; }
.pixout { margin-top: 18px; text-align: center; }
.pixout img, .pixout svg, .pixout canvas { width: 216px; height: 216px; border-radius: 14px; border: 1px solid var(--line); }
.pixout code { display: block; margin-top: 12px; font-size: 11.5px; word-break: break-all; color: var(--ink-2); background: #f4f2ef; padding: 10px; border-radius: 12px; text-align: left; }
.fine { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-2); }

.foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.foot a { color: var(--brand); text-decoration: none; font-weight: 600; }

.nfc-btn { margin-top: 12px; width: 100%; }
.note { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .sheen { animation: none; }
  .card3d, .lift, .glare, .foil { transition: none; }
}
