/* VaySunic Digital Card — Heavy Industrial Style
   Palette: charcoal black + steel gray + safety orange + cyan accents */

:root {
  --bg-0: #0a0b0e;
  --bg-1: #14171c;
  --bg-2: #1c2026;
  --bg-3: #262b33;
  --steel: #3d434d;
  --steel-light: #6b7280;
  --line: #2a2f36;
  --orange: #f97316;       /* safety orange */
  --orange-dim: #c2410c;
  --cyan: #06b6d4;
  --green: #22c55e;
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --text-muted: #6b7280;
  --warn: #facc15;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Industrial hex/grid background */
.hex-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    linear-gradient(135deg, transparent 49%, rgba(60,67,77,0.18) 49.5%, rgba(60,67,77,0.18) 50.5%, transparent 51%) 0 0/40px 40px,
    radial-gradient(circle at 30% 20%, rgba(249,115,22,0.05) 0, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(6,182,212,0.04) 0, transparent 40%),
    var(--bg-0);
}

/* Main card */
.card {
  position: relative; z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 22px 30px;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  border: 1px solid var(--line);
  min-height: 100vh;
}
@media (min-width: 500px) {
  .card { margin: 18px auto; min-height: auto; border-radius: 2px;
          box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 2px 8px rgba(249,115,22,0.05); }
}

/* Blueprint corners */
.corner {
  position: absolute; width: 22px; height: 22px;
  border: 2px solid var(--orange);
  z-index: 2;
}
.corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

/* Top band */
.band { margin-bottom: 18px; }
.band-stripes {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 8px,
    var(--bg-0) 8px 16px
  );
  opacity: 0.6;
}
.meta-line {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
  font-family: 'Courier New', monospace;
  font-size: 10px; letter-spacing: 1.5px;
  color: var(--text-muted);
}
.badge {
  background: var(--orange);
  color: var(--bg-0);
  padding: 3px 8px; font-weight: 700;
}
.serial { color: var(--steel-light); }

/* Identity block */
.identity {
  display: flex; gap: 18px; align-items: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--line);
}
.avatar-wrap {
  position: relative; width: 96px; height: 96px; flex-shrink: 0;
}
.avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--steel);
  filter: contrast(1.05) saturate(0.9);
  background: var(--bg-2);
}
.avatar-ring {
  position: absolute; inset: -6px;
  border: 1px dashed var(--orange);
  border-radius: 50%;
  opacity: 0.7;
}
.ident-text { flex: 1; min-width: 0; }
.ident-label {
  font-family: 'Courier New', monospace;
  font-size: 10px; letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 4px;
}
.ident-name {
  font-size: 22px; font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  text-transform: uppercase;
}
.ident-title {
  font-size: 13px; font-weight: 400;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 0.3px;
}
.ident-company {
  font-size: 12px;
  color: var(--cyan);
  margin-top: 4px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

/* Slogan strip */
.slogan {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px; letter-spacing: 3px;
  color: var(--warn);
  text-transform: uppercase;
  justify-content: center;
}
.slogan-bars {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--steel) 50%, transparent 100%);
}
.slogan-text { font-weight: 700; }

/* CTA grid — 4 columns × 2 rows */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 18px;
}
.cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  padding: 12px 2px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.cta:hover, .cta:active {
  border-color: var(--orange);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.cta-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.cta-icon svg { width: 100%; height: 100%; }
.cta-key {
  font-family: 'Courier New', monospace;
  font-size: 9px; color: var(--text-muted);
  letter-spacing: 1px;
}

/* Specs section */
.specs {
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin: 18px 0;
}
.specs-title {
  font-family: 'Courier New', monospace;
  font-size: 10px; letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 12px;
}
.spec-row {
  display: flex; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.4;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .k {
  flex-shrink: 0; width: 56px;
  font-family: 'Courier New', monospace;
  color: var(--orange);
  font-size: 10px; letter-spacing: 1.5px;
  padding-top: 2px;
}
.spec-row .v {
  flex: 1; min-width: 0;
  color: var(--text-dim);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.spec-row .v a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dotted var(--steel);
}

/* vCard button — primary action, prominent at top */
.vcard-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-dim) 100%);
  color: var(--bg-0);
  text-decoration: none;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  font-size: 13px; letter-spacing: 2px;
  border: none;
  margin: 12px 0 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}
.vcard-btn::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 10px,
    rgba(0,0,0,0.08) 10px 20px
  );
  pointer-events: none;
}
.vcard-btn:active { transform: translateY(1px); }

/* Primary (top, prominent) variant — bigger, with pulse */
.vcard-btn-primary {
  padding: 18px 14px;
  font-size: 15px; letter-spacing: 2.5px;
  border: 2px solid #fff7e6;
  box-shadow: 0 0 0 4px rgba(249,115,22,0.25),
              0 6px 24px rgba(249,115,22,0.45);
  margin: 14px 0 20px;
  flex-direction: column;
  gap: 4px;
  animation: vcard-pulse 2.4s ease-in-out infinite;
}
.vcard-btn-primary svg {
  width: 28px; height: 28px;
}
.vcard-sub {
  font-family: -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.5px;
  opacity: 0.8;
  font-weight: 500;
}
@keyframes vcard-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(249,115,22,0.25),
                0 6px 24px rgba(249,115,22,0.45);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(249,115,22,0.10),
                0 6px 24px rgba(249,115,22,0.55);
  }
}

/* Ecosystem */
.ecosystem {
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.eco-title {
  font-family: 'Courier New', monospace;
  font-size: 10px; letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 10px;
}
.eco-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 10px;
}
.pill {
  background: var(--bg-3);
  border: 1px solid var(--steel);
  padding: 4px 8px;
  font-family: 'Courier New', monospace;
  font-size: 10px; letter-spacing: 1px;
  color: var(--cyan);
}
.eco-loc {
  font-family: 'Courier New', monospace;
  font-size: 11px; letter-spacing: 1.5px;
  color: var(--text-dim);
}
.eco-loc .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--orange); border-radius: 50%;
  margin: 0 6px 0 0;
}
.eco-loc .dot + .dot { margin-left: 12px; }

/* Footer */
.footer {
  display: flex; justify-content: space-between;
  font-family: 'Courier New', monospace;
  font-size: 9px; letter-spacing: 1px;
  color: var(--steel-light);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* WeChat modal */
.modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
}
.modal-body {
  position: relative; z-index: 1;
  background: var(--bg-1);
  border: 2px solid var(--orange);
  padding: 28px 24px;
  max-width: 340px; width: 90%;
  text-align: center;
}
.modal-close {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--steel);
  cursor: pointer; font-size: 14px;
}
.modal-body h3 {
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 16px;
}
.wechat-qr {
  width: 200px; height: 200px;
  background: white; padding: 8px;
  display: block; margin: 0 auto 12px;
}
.qr-hint {
  font-size: 11px; color: var(--text-dim);
  margin-bottom: 14px; line-height: 1.6;
}
.wechat-id-row {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  background: var(--bg-3);
  padding: 8px 10px;
  border: 1px solid var(--line);
}
.wechat-id-row .k {
  font-family: 'Courier New', monospace;
  font-size: 10px; color: var(--orange);
  letter-spacing: 1px;
}
.wechat-id-row code {
  flex: 1; text-align: left;
  font-family: 'Courier New', monospace;
  color: var(--text);
}
.copy-btn {
  background: var(--orange); color: var(--bg-0);
  border: none; padding: 4px 8px;
  font-family: 'Courier New', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer;
}

/* Placeholder for missing WeChat QR */
.wechat-missing {
  padding: 20px; color: var(--warn);
  font-family: 'Courier New', monospace;
  font-size: 12px; text-align: center;
  border: 1px dashed var(--warn);
  margin-bottom: 12px;
}

/* No-image fallback for missing socials (FB / IG) */
.cta.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Small mobile tweaks */
@media (max-width: 380px) {
  .card { padding: 24px 16px; }
  .identity { gap: 12px; }
  .avatar, .avatar-wrap { width: 80px; height: 80px; }
  .cta-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .cta { padding: 12px 2px; font-size: 10px; }
}
