@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("fonts/NotoSansArabic-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050505;
  --bg-elevated: #0c0c0c;
  --surface: #111111;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  --gold: #a88644;
  --gold-bright: #c9a55a;
  --gold-soft: rgba(168, 134, 68, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold-bright);
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(168, 134, 68, 0.08), transparent 55%),
    radial-gradient(800px 400px at 80% 100%, rgba(168, 134, 68, 0.04), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

.page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 40px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #121212 0%, #0a0a0a 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 36px 28px 28px;
  position: relative;
  overflow: hidden;
  animation: rise 0.7s var(--ease) both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 165, 90, 0.55), transparent);
  opacity: 0.9;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.logo-wrap {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.45);
  animation: softIn 0.8s var(--ease) 0.05s both;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

@keyframes softIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: rise 0.75s var(--ease) 0.1s both;
}

.name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.01em;
}

.company {
  margin: 10px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.company-ar {
  margin: 4px 0 0;
  font-family: "Noto Sans Arabic", "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  direction: rtl;
  unicode-bidi: isolate;
  line-height: 1.6;
}

.divider {
  height: 1px;
  margin: 26px 0 22px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  border: 0;
}

.details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: rise 0.75s var(--ease) 0.18s both;
}

.detail {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.detail:hover,
.detail:focus-within {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.detail-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.detail-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
}

.detail-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: normal;
}

.detail-value.email {
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: keep-all;
  /* Prefer wrapping only before @ if needed */
  white-space: normal;
}

@media (max-width: 390px) {
  .detail-value.email { font-size: 0.78rem; }
}

@media (max-width: 360px) {
  .detail-value.email { font-size: 0.74rem; }
  .card { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 320px) {
  .detail-value.email { font-size: 0.68rem; letter-spacing: -0.02em; }
  .card { padding-left: 18px; padding-right: 18px; }
  .name { font-size: 1.55rem; }
}

.detail a.detail-value:hover {
  color: var(--gold-bright);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
  animation: rise 0.75s var(--ease) 0.26s both;
}

.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 165, 90, 0.45);
  background: #161616;
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.btn-primary {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #25d366 0%, #1ebe57 100%);
  border-color: transparent;
  color: #04140a;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #2ee06f 0%, #22c75c 100%);
  border-color: transparent;
  color: #04140a;
}

.btn-primary svg { stroke: currentColor; }

.btn-gold {
  background: linear-gradient(180deg, rgba(201, 165, 90, 0.16), rgba(168, 134, 68, 0.08));
  border-color: rgba(201, 165, 90, 0.35);
  color: var(--gold-bright);
}

.btn-gold:hover {
  background: linear-gradient(180deg, rgba(201, 165, 90, 0.24), rgba(168, 134, 68, 0.12));
  border-color: rgba(201, 165, 90, 0.55);
}

.secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  animation: rise 0.75s var(--ease) 0.32s both;
}

.secondary-row .btn {
  flex-direction: column;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  min-height: 64px;
  padding: 12px 8px;
}

.secondary-row .btn:hover { color: var(--text); }

.qr-panel {
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: rise 0.75s var(--ease) 0.38s both;
}

.qr-panel img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: #0a0a0a;
  flex: 0 0 auto;
}

.qr-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.qr-copy strong {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.qr-copy span {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: #1a1a1a;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 768px) {
  .page { padding: 48px 24px; }
  .card {
    max-width: 460px;
    padding: 44px 36px 32px;
  }
  .name { font-size: 1.9rem; }
  .logo-wrap { width: 124px; height: 124px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.actions .btn-span { grid-column: 1 / -1; }
