/* ==========================================================================
   AXIONMESK — CARTÃO PREMIUM (v1)
   Visual profissional + animações: tilt 3D, brilho, holo, chip metálico.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) PALCO — perspectiva 3D
   -------------------------------------------------------------------------- */
.bnx-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1.586 / 1;
  margin: 0 auto;
  border-radius: 20px;
  padding: 20px 22px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  color: #fff;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.22,1,.36,1), box-shadow .55s ease;
  box-shadow:
    0 2px 4px rgba(0,0,0,.35),
    0 20px 48px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.16);
  will-change: transform;
}

/* ---------- Textura guilhoché ---------- */
.bnx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(58deg, rgba(255,255,255,.055) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(-58deg, rgba(255,255,255,.04) 0 1px, transparent 1px 10px);
}

/* ---------- Brilho de superfície ---------- */
.bnx-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(ellipse at 16% 6%, rgba(255,255,255,.14), transparent 46%),
    radial-gradient(ellipse at 90% 96%, rgba(255,255,255,.07), transparent 52%);
}

.bnx-card > *:not(.bnx-sheen) { position: relative; z-index: 2; }

/* --------------------------------------------------------------------------
   2) ESTADOS
   -------------------------------------------------------------------------- */
.bnx-card--inativo {
  background: radial-gradient(130% 110% at 12% 0%, #3E4753 0%, #252B33 42%, #151A1F 100%);
}

.bnx-card--ativo {
  background: radial-gradient(130% 110% at 10% 0%, #FFE79A 0%, #386BFF 32%, #A87C07 66%, #2A2000 100%);
  color: #1E1600;
  box-shadow:
    0 2px 4px rgba(0,0,0,.3),
    0 22px 50px rgba(56,107,255,.28),
    0 18px 40px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.55);
  animation: cardGlow 4s ease-in-out infinite;
}

@keyframes cardGlow {
  0%, 100% { box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 22px 50px rgba(56,107,255,.24), 0 18px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.55); }
  50%      { box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 26px 64px rgba(56,107,255,.45), 0 18px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.55); }
}

/* --------------------------------------------------------------------------
   3) SHEEN — faixa de luz que percorre o cartão
   -------------------------------------------------------------------------- */
.bnx-card .bnx-sheen {
  position: absolute;
  top: -60%;
  left: -140%;
  width: 60%;
  height: 230%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(255,255,255,.05) 35%,
    rgba(255,255,255,.38) 50%,
    rgba(255,255,255,.05) 66%,
    transparent 100%);
  transform: rotate(10deg);
  animation: sheenMove 6.5s ease-in-out infinite;
}

@keyframes sheenMove {
  0%        { left: -140%; opacity: 0; }
  12%       { opacity: .9; }
  52%       { left: 135%; opacity: .9; }
  60%, 100% { left: 135%; opacity: 0; }
}

/* --------------------------------------------------------------------------
   4) TOPO — logo + marca
   -------------------------------------------------------------------------- */
.bnx-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.bnx-card__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1;
}
.bnx-card__logo img { width: 26px; height: 26px; border-radius: 7px; }

.bnx-card__brand {
  text-align: right;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .17em;
  line-height: 1;
  opacity: .9;
  padding-top: 3px;
}
.bnx-card__brand small {
  display: block;
  font-size: 6.5px;
  letter-spacing: .26em;
  opacity: .65;
  margin-top: 3px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   5) MEIO — chip + holograma
   -------------------------------------------------------------------------- */
.bnx-card__mid {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  position: static !important;
}

/* CHIP metálico */
.bnx-card__chip {
  width: 44px;
  height: 33px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #FFEFB8 0%, #E7C869 18%, #C9A02F 48%, #8E6C15 78%, #D8BC70 100%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.9),
    inset 0 -1px 3px rgba(0,0,0,.45),
    0 2px 6px rgba(0,0,0,.4);
  border: 1px solid rgba(120,90,20,.4);
}

/* grade de contatos */
.bnx-card__chip::before {
  content: "";
  position: absolute;
  inset: 5px 7px;
  border-radius: 2px;
  border: 1px solid rgba(95,72,12,.55);
  background-image:
    linear-gradient(to right, transparent 47%, rgba(95,72,12,.55) 48%, rgba(95,72,12,.55) 52%, transparent 53%),
    linear-gradient(to bottom, transparent 31%, rgba(95,72,12,.5) 32%, rgba(95,72,12,.5) 35%, transparent 36%),
    linear-gradient(to bottom, transparent 64%, rgba(95,72,12,.5) 65%, rgba(95,72,12,.5) 68%, transparent 69%);
  box-sizing: border-box;
}

/* reflexo do chip */
.bnx-card__chip::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
  transform: skewX(-20deg);
  animation: chipShine 5.5s ease-in-out infinite;
}

@keyframes chipShine {
  0%, 68%  { left: -80%; }
  86%, 100%{ left: 130%; }
}

/* HOLOGRAMA */
.bnx-holo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  opacity: .9;
  background: conic-gradient(from 200deg,
    #ff7a9c 0deg, #ffd166 55deg, #a8e063 110deg,
    #56ccf2 165deg, #9b7bff 220deg, #ff7ad9 280deg, #ff7a9c 360deg);
  box-shadow:
    inset 0 0 7px rgba(255,255,255,.7),
    inset 0 0 2px rgba(0,0,0,.35),
    0 1px 3px rgba(0,0,0,.4);
  animation: holoSpin 14s linear infinite;
}

.bnx-holo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: repeating-linear-gradient(118deg,
    rgba(255,255,255,.42) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: .85;
}
.bnx-holo::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
}

@keyframes holoSpin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   6) NÚMERO
   -------------------------------------------------------------------------- */
.bnx-card__num {
  margin: 16px 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(16px, 4.4vw, 20px);
  font-weight: 700;
  letter-spacing: .075em;
  white-space: nowrap;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.bnx-card--ativo .bnx-card__num { color: #1E1600; text-shadow: 0 1px 2px rgba(255,255,255,.3); }

/* --------------------------------------------------------------------------
   7) DADOS — titular / validade / cvv
   -------------------------------------------------------------------------- */
.bnx-card__row {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  margin-top: auto;
  padding-top: 12px;
}

.bnx-card__field { min-width: 0; }
.bnx-card__field:nth-child(1) { flex: 1 1 auto; }

.bnx-card__label {
  font-size: 7.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .66;
  margin-bottom: 3px;
  font-weight: 700;
  white-space: nowrap;
}

.bnx-card__holder,
.bnx-card__exp {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.bnx-card__holder { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }

.bnx-card--ativo .bnx-card__holder,
.bnx-card--ativo .bnx-card__exp { text-shadow: none; color: #1E1600; }

/* --------------------------------------------------------------------------
   8) STATUS
   -------------------------------------------------------------------------- */
.bnx-card__status {
  position: absolute;
  top: 18px;
  right: 20px;
  transform: translateY(40px);
  z-index: 4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(240,242,245,.92);
}
.bnx-card--ativo .bnx-card__status {
  background: rgba(0,0,0,.14);
  border-color: rgba(0,0,0,.18);
  color: rgba(30,22,0,.85);
}

/* cadeado desativado visualmente */
.bnx-card__lock { display: none !important; }

/* --------------------------------------------------------------------------
   9) INTERAÇÃO — tilt 3D no hover (desktop)
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .bnx-card:hover {
    transform: rotateY(-7deg) rotateX(4deg) translateY(-5px) scale(1.012);
    box-shadow:
      0 4px 10px rgba(0,0,0,.35),
      0 30px 64px rgba(0,0,0,.6),
      inset 0 1px 0 rgba(255,255,255,.2);
  }
  .bnx-card--ativo:hover {
    box-shadow:
      0 4px 10px rgba(0,0,0,.35),
      0 32px 70px rgba(56,107,255,.5),
      0 24px 48px rgba(0,0,0,.5),
      inset 0 1px 0 rgba(255,255,255,.6);
  }
}

/* toque no mobile */
.bnx-card:active {
  transform: scale(.985);
  transition-duration: .15s;
}

/* --------------------------------------------------------------------------
   10) MOBILE — proporções ajustadas
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .bnx-card {
    max-width: 100%;
    border-radius: 18px;
    padding: 16px 18px;
  }
  .bnx-card__logo { font-size: 14.5px; gap: 7px; }
  .bnx-card__logo img { width: 23px; height: 23px; }
  .bnx-card__brand { font-size: 9.5px; }
  .bnx-card__brand small { font-size: 5.5px; }
  .bnx-card__mid { margin-top: 11px; }
  .bnx-card__chip { width: 38px; height: 28px; }
  .bnx-holo { width: 25px; height: 25px; }
  .bnx-card__num { margin-top: 13px; font-size: 15px; letter-spacing: .055em; }
  .bnx-card__row { gap: 18px; padding-top: 10px; }
  .bnx-card__label { font-size: 6.8px; }
  .bnx-card__holder, .bnx-card__exp { font-size: 10px; }
  .bnx-card__holder { max-width: 100px; }
  .bnx-card__status { top: 14px; right: 16px; transform: translateY(34px); font-size: 7px; padding: 2px 7px; }
}

@media (max-width: 380px) {
  .bnx-card { padding: 13px 14px; }
  .bnx-card__num { font-size: 13px; letter-spacing: .035em; }
  .bnx-card__row { gap: 12px; }
  .bnx-holo { width: 21px; height: 21px; }
}

/* --------------------------------------------------------------------------
   11) ACESSIBILIDADE
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bnx-sheen,
  .bnx-card__chip::after,
  .bnx-holo,
  .bnx-card--ativo { animation: none !important; }
  .bnx-card { transition: none !important; }
}
