/* ====================================================
   Navigo Digital Business Cards — Shared Styles
   ====================================================
   Used by all employee pages and the directory page.
   Change colors here = changes everywhere.
   ==================================================== */


/* ============ COLOR PALETTE ============
   Change these to rebrand the whole site */
:root {
  --color-primary: #1A6DBC;
  --color-primary-light: #2E90E8;
  --color-primary-dark: #0F5499;
  --color-primary-bg: #E6F1FB;
  --color-primary-50: #F4F9FE;

  --color-text: #1A1A1A;
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #888;
  --color-border: #D5D5D5;
  --color-divider: #F5F5F5;
  --color-white: #FFFFFF;

  --shadow-sm: 0 4px 24px rgba(26, 109, 188, 0.08), 0 1px 3px rgba(26, 109, 188, 0.05);
  --shadow-md: 0 8px 24px rgba(26, 109, 188, 0.15);
  --shadow-lg: 0 24px 48px rgba(26, 109, 188, 0.25);

  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-sm: 8px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============ RESET ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #EBF4FE 0%, #FFFFFF 50%, #EBF4FE 100%);
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

body.modal-open { overflow: hidden; }


/* ============ BUSINESS CARD ============ */
.card-wrapper {
  width: 100%;
  max-width: 380px;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Header (blue band with brand name + icon) */
.card__header {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  padding: 24px 24px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.card__header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.card__brand {
  color: var(--color-white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}

.card__brand-icon {
  width: 40px;
  height: 40px;
  background: var(--color-white);
  border-radius: 10px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.card__brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar circle (sticks up over the header) */
.card__avatar-wrap {
  padding: 0 24px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.card__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  border: 4px solid var(--color-white);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.5px;
}

.card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Name + title block */
.card__identity {
  padding: 14px 24px 20px;
}

.card__name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--color-text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.card__title {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
  line-height: 1.5;
}

.card__subtitle {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Action button grid */
.card__actions {
  padding: 0 20px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.action {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border-radius: var(--radius-btn);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 11px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.action svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.action:hover {
  background: #D5E5F5;
  transform: translateY(-1px);
}

.action:active { transform: scale(0.96); }

.action--primary {
  grid-column: span 3;
  background: var(--color-primary);
  color: var(--color-white);
  flex-direction: row;
  padding: 14px;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

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

/* QR trigger button */
.qr-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 40px);
  margin: 0 20px 16px;
  padding: 12px;
  background: transparent;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-btn);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.qr-toggle svg { width: 18px; height: 18px; }

.qr-toggle:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  background: var(--color-primary-50);
}

.card__footer {
  border-top: 1px solid var(--color-divider);
  padding: 14px 24px;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  font-weight: 500;
}


/* ============ QR MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 109, 188, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: overlayIn 0.2s ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--color-white);
  border-radius: 24px;
  width: 100%;
  max-width: 340px;
  padding: 32px 24px 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-divider);
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal__close svg { width: 16px; height: 16px; }

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

.modal__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.modal__subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.modal__qr-box {
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-btn);
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.modal__qr-box > div {
  width: 240px;
  height: 240px;
}

.modal__qr-box canvas,
.modal__qr-box img,
.modal__qr-box > div {
  max-width: 100%;
  height: auto;
  display: block;
}

.modal__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-primary-50);
  border-radius: var(--radius-btn);
}

.modal__brand-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 600;
  font-size: 14px;
}

.modal__brand-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__brand-text { text-align: left; }

.modal__brand-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.modal__brand-org {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 1px;
}


/* ============ DIRECTORY PAGE ============ */
.directory {
  width: 100%;
  max-width: 420px;
  padding: 20px 0;
}

.directory__header {
  text-align: center;
  margin-bottom: 32px;
}

.directory__logo {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.directory__subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.directory__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.directory__item {
  background: var(--color-white);
  border-radius: var(--radius-btn);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  color: inherit;
}

.directory__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.directory__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.directory__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory__info {
  flex: 1;
  min-width: 0;
}

.directory__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.directory__role {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.directory__arrow {
  width: 18px;
  height: 18px;
  color: var(--color-border);
  flex-shrink: 0;
}

.directory__footer {
  text-align: center;
  padding-top: 16px;
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}

.directory__footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.directory__footer a:hover { color: var(--color-primary); }


/* ============ RESPONSIVE ============ */
@media (max-width: 360px) {
  .card__actions { gap: 6px; }
  .action { padding: 12px 6px; font-size: 10px; }
  .action svg { width: 20px; height: 20px; }
  .modal__qr-box > div { width: 200px; height: 200px; }
}
