:root {
  --bg-cream: #fbf1e4;
  --card-surface: #fffcf8;
  --card-border: #e7dbc9;

  --brown: #2a1d16;
  --brown-soft: #6b5d51;
  --muted: #8b7f72;

  --terracotta: #c1613c;
  --terracotta-soft: rgba(193, 97, 60, 0.1);

  --white: #ffffff;

  --shadow-card: 0 24px 70px rgba(42, 29, 22, 0.12);
  --shadow-button: 0 6px 16px rgba(42, 29, 22, 0.06);
  --ring: 0 0 0 3px rgba(193, 97, 60, 0.28);

  --radius-card: 30px;
  --radius-round: 999px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-cream);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--brown);
  background:
    radial-gradient(circle at 12% 8%, rgba(193, 97, 60, 0.08), transparent 36%),
    radial-gradient(circle at 90% 88%, rgba(42, 29, 22, 0.05), transparent 40%),
    linear-gradient(160deg, #fdf5ea 0%, #fbf1e4 55%, #f9ece0 100%);
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.card-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
}

.identity-card {
  width: min(100%, 390px);
  position: relative;
  overflow: hidden;
  padding: 22px 22px 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--card-surface);
  box-shadow: var(--shadow-card);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.brand-logo { display: inline-flex; align-items: center; height: 52px; max-width: 100px; min-width: 0; } .brand-logo-full { height: 100%; width: auto; max-width: 100%; object-fit: contain; }

.utility-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-round);
  color: var(--brown-soft);
  background: transparent;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.top-icon-button i {
  font-size: 1.05rem;
  line-height: 1;
}

.top-icon-button:hover {
  transform: translateY(-1px);
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.profile-block {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 14px;
}

.profile-photo-ring {
  width: 104px;
  height: 104px;
  border-radius: 28px;
  padding: 3px;
  margin-bottom: 10px;
  background: var(--terracotta);
  box-shadow: var(--shadow-button);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 25px;
  display: block;
  border: 3px solid var(--card-surface);
}

.profile-initials {
  width: 100%;
  height: 100%;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", "Georgia", serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  background: var(--brown);
  border: 3px solid var(--card-surface);
}

.profile-block h1 {
  margin: 0;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(1.6rem, 5vw, 1.95rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--brown);
}

.role {
  max-width: 340px;
  margin: 6px auto 0;
  display: grid;
  gap: 2px;
  color: var(--terracotta);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
}

.role span {
  display: block;
}

.tagline {
  max-width: 280px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.qr-section {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 18px auto 14px;
}

.qr-button {
  width: 156px;
  height: 156px;
  padding: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-button);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.qr-button:hover {
  transform: translateY(-2px);
  border-color: var(--terracotta);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.card-url {
  color: var(--brown-soft);
  font-size: 0.76rem;
  line-height: 1;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--card-border);
  transition: color 160ms ease, border-color 160ms ease;
}

.card-url:hover {
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.contact-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  row-gap: 14px;
  margin: 16px auto 26px;
  flex-wrap: wrap;
}

.social-item {
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.social-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-round);
  color: var(--brown);
  background: transparent;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.social-button i {
  font-size: 1.1rem;
  line-height: 1;
}

.social-button:hover {
  transform: translateY(-2px);
  color: var(--terracotta);
  border-color: var(--terracotta);
  background: var(--terracotta-soft);
}

.social-button:active {
  transform: translateY(0);
}

.social-caption {
  width: 60px;
  display: block;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.site-link {
  display: table;
  margin: 0 auto;
  color: var(--brown-soft);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--card-border);
  transition: color 160ms ease, border-color 160ms ease;
}

.site-link:hover {
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.footer-wordmark {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.footer-wordmark img {
  height: 18px;
  object-fit: contain;
  opacity: 0.92;
}

.modal {
  width: min(calc(100vw - 32px), 400px);
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 26px;
  color: var(--brown);
  background: transparent;
  box-shadow: 0 28px 80px rgba(42, 29, 22, 0.25);
}

.modal::backdrop {
  background: rgba(42, 29, 22, 0.5);
  backdrop-filter: blur(6px);
}

.modal-card {
  padding: 18px;
  border-radius: inherit;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-top h2 {
  margin: 0;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brown);
}

.modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-round);
  color: var(--brown-soft);
  background: transparent;
  cursor: pointer;
}

.modal-close i {
  font-size: 0.95rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.modal-qr {
  display: grid;
  place-items: center;
  width: 300px;
  height: 300px;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--card-border);
}

.modal-qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.instagram-qr {
  width: min(280px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--card-border);
  padding: 14px;
}

.modal-url {
  display: table;
  margin: 0 auto 14px;
  max-width: 100%;
  color: var(--brown-soft);
  font-size: 0.8rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: center;
  border-bottom: 1px solid var(--card-border);
}

.modal-url:hover {
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.modal-copy {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--terracotta);
  border-radius: var(--radius-round);
  color: var(--white);
  background: var(--terracotta);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 160ms ease, background 160ms ease;
}

.modal-copy:hover {
  transform: translateY(-1px);
  background: #a84f30;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-round);
  color: var(--white);
  background: var(--brown);
  box-shadow: 0 14px 34px rgba(42, 29, 22, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
}

.top-icon-button:focus-visible,
.social-button:focus-visible,
.qr-button:focus-visible,
.site-link:focus-visible,
.modal-close:focus-visible,
.modal-copy:focus-visible,
.card-url:focus-visible,
.modal-url:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

@media (max-width: 430px) {
  .card-page {
    padding: 12px;
  }

  .identity-card {
    width: min(100%, 370px);
    padding: 18px 16px 16px;
    border-radius: 24px;
  }

  .brand-logo {
    max-width: 170px;
    height: 48px;
  }

  .brand-logo-icon {
    height: 27px;
    width: 27px;
  }

  .brand-logo-word {
    max-height: 21px;
  }

  .profile-photo-ring {
    width: 92px;
    height: 92px;
    border-radius: 24px;
  }

  .profile-photo,
  .profile-initials {
    border-radius: 21px;
  }

  .profile-block h1 {
    font-size: 1.5rem;
  }

  .role {
    max-width: 310px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .tagline {
    font-size: 0.76rem;
  }

  .qr-button {
    width: 146px;
    height: 146px;
  }

  .contact-row {
    gap: 8px;
    margin-bottom: 24px;
  }

  .social-item,
  .social-button {
    width: 40px;
  }

  .social-button {
    height: 40px;
  }

  .social-button i {
    font-size: 1rem;
  }

  .social-caption {
    width: 56px;
    font-size: 0.5rem;
  }

  .modal {
    width: min(calc(100vw - 24px), 380px);
  }

  .modal-qr {
    width: 270px;
    height: 270px;
  }
}

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

/* ---- Additions for the Zan / Vijai cards ---- */
/* Show each photo whole: the frame follows the photo's own shape. */
.profile-photo-ring {
  height: auto;
}

.profile-photo {
  height: auto;
  object-fit: contain;
}
.bio {
  max-width: 320px;
  margin: 10px auto 0;
  color: var(--brown-soft);
  font-size: 0.8rem;
  line-height: 1.6;
}

.join-button {
  width: 100%;
  min-height: 48px;
  margin: 16px 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-round);
  color: var(--white);
  background: var(--terracotta);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(193, 97, 60, 0.28);
  transition: transform 160ms ease, background 160ms ease;
}

.join-button i {
  font-size: 1.1rem;
  line-height: 1;
}

.join-button:hover {
  transform: translateY(-1px);
  background: #a84f30;
}

.join-button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.follow-label {
  margin: 14px 0 -6px;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 430px) {
  .bio {
    font-size: 0.76rem;
  }

  .join-button {
    min-height: 46px;
    font-size: 0.82rem;
  }
}
