/* Public digital visiting card — mobile-first */

:root {
  --bg-deep: #0b3d2e;
  --bg-mid: #125c45;
  --bg-soft: #e8f5ef;
  --surface: #ffffff;
  --ink: #12261f;
  --ink-soft: #3d5a4e;
  --muted: #6b8478;
  --line: #d5e8de;
  --call: #0f766e;
  --wa: #128c7e;
  --mail: #1d4ed8;
  --accent: #c4a035;
  --shadow: 0 18px 50px rgba(11, 61, 46, 0.18);
  --radius: 22px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Outfit", "DM Sans", sans-serif;
}

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

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

body.public-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a7a5c 0%, transparent 55%),
    linear-gradient(165deg, #06281e 0%, #0b3d2e 40%, #0f4f3a 100%);
  background-attachment: fixed;
}

.dvc-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 40px;
}

.dvc-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px 24px;
  animation: cardIn 0.55s ease both;
  overflow: hidden;
  position: relative;
}

.dvc-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #0f766e, #c4a035, #0f766e);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dvc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  animation: fadeUp 0.5s ease 0.08s both;
}

.dvc-logo,
.dvc-logo-fallback {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.dvc-logo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--bg-deep);
  letter-spacing: 0.04em;
}

.dvc-brand-text strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bg-deep);
  letter-spacing: 0.02em;
}

.dvc-brand-text p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.dvc-avatar {
  width: 128px;
  height: 128px;
  margin: 0 auto 16px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(145deg, #0f766e, #c4a035);
  animation: fadeUp 0.55s ease 0.15s both;
}

.dvc-avatar img,
.dvc-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  display: block;
  background: var(--bg-soft);
}

.dvc-avatar-fallback {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bg-deep);
}

.dvc-name {
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  animation: fadeUp 0.55s ease 0.2s both;
}

.dvc-role {
  margin: 6px 0 0;
  text-align: center;
  color: var(--call);
  font-weight: 600;
  font-size: 0.98rem;
  animation: fadeUp 0.55s ease 0.24s both;
}

.dvc-org {
  margin: 4px 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  animation: fadeUp 0.55s ease 0.28s both;
}

.dvc-primary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px 28px;
  margin: 22px 0 8px;
  animation: fadeUp 0.55s ease 0.32s both;
}

.dvc-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0;
  padding: 8px 4px;
  border-radius: 0;
  background: none;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.dvc-btn i {
  font-size: 1.35rem;
  line-height: 1;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dvc-btn.wa i {
  font-size: 1.45rem;
  width: 1.45rem;
  height: 1.45rem;
}

.dvc-btn.call {
  background: none;
  color: var(--call);
}

.dvc-btn.wa {
  background: none;
  color: #25d366;
}

.dvc-btn.mail {
  background: none;
  color: var(--mail);
}

.dvc-btn:active {
  transform: scale(0.96);
  opacity: 0.85;
}

.dvc-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  animation: fadeUp 0.55s ease 0.36s both;
}

.dvc-section h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--bg-deep);
}

.dvc-section p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.92rem;
}

.dvc-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.dvc-contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dvc-contact-list i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  color: var(--bg-deep);
  flex-shrink: 0;
}

.dvc-contact-list .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px;
}

.dvc-contact-list a,
.dvc-contact-list span {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  word-break: break-word;
}

.dvc-contact-list a:hover {
  color: var(--call);
}

.dvc-secondary-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  animation: fadeUp 0.55s ease 0.4s both;
}

.dvc-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #f7fbf9;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dvc-secondary:hover {
  background: var(--bg-soft);
  border-color: #b7d7c8;
}

.dvc-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dvc-footer p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.dvc-footer a {
  display: inline-block;
  margin-top: 4px;
  color: var(--call);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

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

/* Modal */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 40, 30, 0.55);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  background: #fff;
  border-radius: 20px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: cardIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.modal-dialog h2 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 1.15rem;
}

.qr-large {
  width: min(100%, 240px);
  height: auto;
  margin: 0 auto 12px;
  display: block;
  border-radius: 12px;
  background: #fff;
}

.qr-url {
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
  margin: 0 0 16px;
}

.modal-dialog .dvc-btn {
  flex-direction: row;
  gap: 8px;
  min-height: 48px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(160deg, #0f766e, #115e59);
  color: #fff;
}

.modal-dialog .dvc-btn i {
  font-size: 1rem;
  width: auto;
  height: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 1100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast[hidden] {
  display: none !important;
}

@media (min-width: 520px) {
  .dvc-shell {
    padding-top: 32px;
  }
}
