/* ─────────────────────────────────────────────────────────────
   Ignite Kit — Digital Business Card PWA Stylesheet
   Proven CBN Card Architecture (/card and /qr)
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.card-view,
body.qr-view {
  min-height: 100vh;
  background-color: #e2e8f0;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 13px 20px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  box-sizing: border-box;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-secondary:hover {
  background-color: rgba(var(--primary-rgb), 0.08);
}

.btn-ghost {
  background-color: #ffffff;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background-color: #f8fafc;
}

/* ── Card Page Container ───────────────────────────────────── */
.card-page {
  width: 100%;
  max-width: 440px;
  min-height: calc(100svh - 24px);
  background-color: var(--surface);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1.5px solid var(--border);
  border-top: 5px solid var(--primary);
}

/* ── Card Header ───────────────────────────────────────────── */
.card-header {
  padding: 28px 24px 20px;
  text-align: center;
  background-color: var(--surface);
}

.card-header .logo {
  max-width: 220px;
  max-height: 60px;
  margin: 0 auto 18px;
  object-fit: contain;
}

.card-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-name {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
  text-wrap: balance;
}

.card-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-wrap: balance;
}

.card-company {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Decorative Divider ────────────────────────────────────── */
.card-divider {
  height: 12px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cpath d='M5 2l5 4-5 4' fill='none' stroke='%23CBD5E1' stroke-width='2'/%3E%3C/svg%3E") repeat-x center;
}

/* ── Card Body & Contact List ──────────────────────────────── */
.card-body {
  flex: 1;
  padding: 0;
}

.contact-list {
  list-style: none;
  border-top: 1px solid var(--border);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.12s ease;
  min-height: 64px;
}

.contact-item:hover,
.contact-item:active {
  background-color: #f8fafc;
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-arrow {
  font-size: 1.4rem;
  color: #cbd5e1;
  font-weight: 300;
  padding-left: 4px;
}

/* ── Card Footer Actions ───────────────────────────────────── */
.card-footer {
  padding: 20px;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-nav-link {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-top: 4px;
}

.card-nav-link:hover {
  color: var(--primary);
}

/* ══════════════ QR VIEW (/qr) ══════════════ */
.qr-page {
  width: 100%;
  max-width: 440px;
  min-height: calc(100svh - 24px);
  background-color: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 18px;
  padding: 36px 24px 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1.5px solid var(--border);
  border-top: 5px solid var(--primary);
}

.qr-page .logo {
  max-width: 200px;
  max-height: 54px;
  margin-bottom: 16px;
  object-fit: contain;
}

.qr-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.qr-frame {
  background-color: #ffffff;
  padding: 16px;
  border-radius: 16px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  display: inline-block;
}

#qrcode {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrcode img,
#qrcode canvas {
  display: block;
  width: 220px;
  height: 220px;
}

.qr-hint {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.qr-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.install-tip {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.install-tip.visible {
  display: block;
}
