* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(circle at center, #111 0, #000 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 16px 40px;
}

.card-container {
  width: min(420px, 100%);
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 1200px;
  -webkit-perspective: 1200px;
}

.tilt-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  transition: transform 0.18s ease-out;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.platinum-card {
  position: relative;
  width: 100%;
  aspect-ratio: 420 / 260;
  height: auto;
  border: 0;
  border-radius: 16px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(212, 175, 55, 0.16);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: rotateY(0deg);
  -webkit-transform: rotateY(0deg);
  transition: transform 0.8s ease;
  will-change: transform;
}

.platinum-card::before {
  content: none;
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  background:
    linear-gradient(115deg,
      transparent 15%,
      rgba(255, 255, 255, .55) 45%,
      transparent 65%);
  background-size: 220% 220%;
  animation: shine 6s ease-in-out infinite;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.platinum-card.flipped {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

@keyframes shine {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: clamp(14px, 4vw, 24px);
  background: #d4af37 url(./credit1.jpeg) no-repeat center / 104% 104%;
  border-radius: 16px;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(0deg) translateZ(1px);
  -webkit-transform: rotateY(0deg) translateZ(1px);
  overflow: hidden;
  transform-origin: center;
  -webkit-transform-origin: center;
}

.card-front {
  text-align: left;
}

.card-back {
  text-align: center;
  transform: rotateY(180deg) translateZ(1px);
  -webkit-transform: rotateY(180deg) translateZ(1px);
}

.platinum-card:not(.flipped) .card-back,
.platinum-card.flipped .card-front {
  pointer-events: none;
}

.brand-title {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  margin: 0;
  gap: 14px;
  font-size: clamp(13px, 3.8vw, 18px);
  font-weight: 700;
  line-height: 1.25;
}

.card-front .brand-title {
  justify-content: flex-start;
}

.company-name {
  min-width: 0;
  text-align: left;
  font-size: clamp(8px, 2.5vw, 18px);
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: clamp(96px, 27vw, 112px);
  max-width: 100%;
  height: auto;
  max-height: 60px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 2px;
  clip-path: inset(8% 5% 18% 5% round 2px);
}

.front-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.person-details h1 {
  margin: 0 0 5px;
  font-size: clamp(0.95rem, 4.8vw, 1.2rem);
  line-height: 1.2;
  font-weight: 700;
  color: #111;
}

.role {
  margin: 0 0 4px;
  color: #333;
  font-size: 0.9rem;
}

.phone-text {
  display: block;
  color: #222;
  text-decoration: none;
  font-size: 0.9rem;
}

.phone-text:hover {
  text-decoration: underline;
}

.qr-box {
  width: clamp(104px, 29vw, 122px);
  height: clamp(104px, 29vw, 122px);
  padding: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.qr-box canvas,
.qr-box img {
  display: block;
  width: 100% !important;
  height: auto !important;
  image-rendering: pixelated;
}

#frontQr,
#mapQr {
  width: 100%;
}

.address-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.address-block p {
  margin: 0;
  color: #332709;
  font-size: clamp(0.72rem, 3.6vw, 0.9rem);
  line-height: 1.4;
}

.address-block i {
  margin-right: 7px;
}

.qr-box.small {
  width: 104px;
  height: 104px;
  margin: 0;
}

.qr-box.small canvas,
.qr-box.small img {
  width: 100% !important;
  height: auto !important;
}

.platinum-btn {
  display: block;
  width: 100%;
  border: 1px solid #f7dc83;
  border-radius: 50px;
  padding: 12px 20px;
  min-height: 47px;
  background: linear-gradient(115deg, #f3c735 0%, #ffe574 45%, #ffce24 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #000;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.platinum-btn:hover {
  background: linear-gradient(115deg, #ffd54a 0%, #ffed94 45%, #ffd438 100%);
  box-shadow: 0 6px 16px rgba(255, 206, 36, 0.20);
  transform: translateY(-2px);
}

.platinum-btn:active {
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.10);
  transform: translateY(0);
}

.platinum-btn:focus-visible {
  outline: 2px solid #ffe574;
  outline-offset: 4px;
}

.platinum-btn i {
  margin-right: 8px;
}

.flip-btn {
  width: auto;
  min-width: 112px;
  margin-top: 16px;
}

.action-list {
  width: 75%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 48px auto 0;
}

@media (max-width: 480px) {
  .page {
    padding-top: 28px;
  }

  .card-container,
  .tilt-wrap {
    width: 100%;
  }

  .platinum-card {
    width: 100%;
  }

  .brand-logo {
    width: clamp(96px, 27vw, 112px);
    max-height: 60px;
  }

  .role,
  .phone-text {
    font-size: 0.75rem;
  }

  .platinum-btn {
    font-size: 14px;
    padding: 12px 15px;
  }

  .action-list {
    margin-top: 36px;
  }

  .qr-box.small {
    width: 104px;
    height: 104px;
  }

  .qr-box.small canvas,
  .qr-box.small img {
    width: 100% !important;
    height: auto !important;
  }

}

@media (prefers-reduced-motion: reduce) {

  .platinum-card,
  .tilt-wrap,
  .platinum-btn {
    transition: none;
  }

  .platinum-card::before {
    animation: none;
  }
}
