/* Визитка компании: карточка, переворот, модальное окно. Дизайн — /workspace/company-vcard/card.css и SPEC.md.
   10.11.2026, v20261110vca. Подсказка сохранения контакта на Android. */
.vc {
  --w: 520px; width: var(--w); max-width: 100%; aspect-ratio: auto; min-height: calc(min(100%, var(--w)) / 1.586); box-sizing: border-box;
  border-radius: 22px; padding: 24px 26px 46px; color: #fff; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(224,180,90,.22), transparent 45%),
    linear-gradient(145deg, #123047 0%, #0b1f33 55%, #08172a 100%);
  box-shadow: 0 22px 50px rgba(11,31,51,.30);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}
.vc *, .vc *::before, .vc *::after { box-sizing: border-box; }
.vc::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px);
}
.vc > * { position: relative; z-index: 1; }
.vc .top { display: flex; align-items: center; justify-content: space-between; }
.vc .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; }
.vc .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(145deg, #d97706, #b45309);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff;
}
.vc .chip {
  width: 42px; height: 32px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, #f3d58a, #e0b45a 45%, #c9963a); position: relative;
}
.vc .chip::before { content: ""; position: absolute; inset: 7px 0; border-top: 1px solid #8a642066; border-bottom: 1px solid #8a642066; }
.vc .chip::after { content: ""; position: absolute; inset: 0 15px; border-left: 1px solid #8a642066; border-right: 1px solid #8a642066; }
.vc h2 { margin: 16px 0 2px; font-size: 24px; font-weight: 800; letter-spacing: .005em; color: #fff; }
.vc-tag { color: #e0b45a; font-size: 13px; font-weight: 700; margin: 0 0 10px; }

.vc-offer {
  display: block; margin: 0 0 12px; padding: 8px 12px; max-width: 100%; min-width: 0;
  box-sizing: border-box; text-align: center; overflow-wrap: anywhere; hyphens: auto;
  border-radius: 10px; border: 1.5px solid rgba(224,180,90,.75);
  background: linear-gradient(180deg, rgba(243,213,138,.22), rgba(224,180,90,.12));
  color: #f3d58a; font-size: 13px; font-weight: 800; letter-spacing: .01em; line-height: 1.35;
}
.vc-offer a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.vc-offer a:hover { color: #fff; }
.vc-offer a:focus-visible { outline: 3px solid #f3d58a; outline-offset: 2px; border-radius: 2px; }


.vc .rows { display: grid; gap: 7px; font-size: 14px; }
.vc .rows > div { display: flex; gap: 10px; align-items: baseline; min-width: 0; flex-wrap: wrap; }
.vc .rows b, .vc .rows .val { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.vc .k {
  color: #9fb0bf; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; min-width: 74px; flex: none;
}
.vc .rows a { color: #fff; text-decoration: none; font-weight: 700; }
.vc .rows a:hover { text-decoration: underline; text-underline-offset: 2px; }
.vc-copy {
  flex: none; margin-left: auto; min-height: 28px; padding: 3px 10px; border-radius: 999px;
  font: 700 11px/1 "Manrope", system-ui, sans-serif; cursor: pointer; white-space: nowrap;
  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.32);
}
.vc-copy:hover { background: rgba(255,255,255,.22); }
.vc-copy.is-done { background: #0f766e; border-color: #5eead4; }
.vc-copy:focus-visible { outline: 3px solid #f3d58a; outline-offset: 2px; }
.vc .foot {
  position: absolute; left: 26px; right: 26px; bottom: 18px; z-index: 1;
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: #c5d0d8;
}
.vc .foot span:last-child { color: #e0b45a; }
.vc.back .foot { grid-column: 1 / -1; }
.vc.back { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.vc.back .qr {
  width: 132px; height: 132px; background: #fff; border-radius: 12px; padding: 8px;
  box-sizing: border-box; align-self: center; flex: none;
}
.vc.back .qr img, .vc.back .qr svg { width: 100%; height: 100%; display: block; }
.vc.back .qrcap { font-size: 11px; color: #c5d0d8; text-align: center; margin-top: 6px; }

.vc-stage { width: var(--w, 520px); max-width: 100%; min-width: 0; }
.vc-stage, .vc-actions { --w: 520px; }
.vc-inner { display: grid; gap: 14px; min-width: 0; }
.vc-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; width: var(--w); max-width: 100%;
}
.vc-actions .a {
  min-width: 0; min-height: 44px; border-radius: 14px; border: 1.5px solid #e4ddd2;
  background: #fff; color: #14202b; font: 700 14px/1.15 "Manrope", "Segoe UI", system-ui, sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  white-space: normal; padding: 0 12px; cursor: pointer;
}
.vc-actions .a.dark { background: #0b1f33; color: #fff; border-color: rgba(224,180,90,.55); }
.vc-actions .a.amber { background: #d97706; color: #fff; border-color: #d97706; }
.vc-actions .a:focus-visible { outline: 3px solid #f3d58a; outline-offset: 2px; }

/* Переворот — как у карты реквизитов, 0.5s */
.vc-ready .vc-stage { perspective: 1600px; }
.vc-ready .vc-inner { gap: 0; transform-style: preserve-3d; transition: transform .5s; }
.vc-ready .vc { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: visibility 0s linear .25s; }
.vc-ready .vc.back { transform: rotateY(180deg); visibility: hidden; }
.vc-ready.is-flipped .vc-inner { transform: rotateY(180deg); }
.vc-ready.is-flipped .vc:not(.back) { visibility: hidden; }
.vc-ready.is-flipped .vc.back { visibility: visible; }

/* Модальное окно — та же схема, что у реквизитов */
html.vc-lock, html.vc-lock body { overflow: hidden; }
.vc-modal {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 16px; border: 0; box-sizing: border-box; overflow: hidden;
  background: rgba(8, 23, 42, .6); color: #14202b;
  opacity: 0; transition: opacity .22s ease;
}
.vc-modal[open] { display: flex; align-items: center; justify-content: center; }
.vc-modal::backdrop { background: transparent; }
.vc-modal.is-open { opacity: 1; }
.vc-modal-box {
  position: relative; width: 100%; max-width: 572px; max-height: 100%;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  box-sizing: border-box; padding: 20px 20px 18px; border-radius: 22px;
  background: #fbf8f3; box-shadow: 0 30px 80px rgba(0,0,0,.35);
  transform: translateY(18px) scale(.97); transition: transform .26s cubic-bezier(.2,.75,.2,1);
}
.vc-modal.is-open .vc-modal-box { transform: none; }
.vc-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid #e4ddd2; background: #fff; color: #0b1f33;
  font: 700 18px/1 "Manrope", system-ui, sans-serif;
}
.vc-close:hover { background: #f4efe6; }
.vc-close:focus-visible { outline: 3px solid #f3d58a; outline-offset: 2px; }
.vc-modal-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.vc-share-menu {
  margin-top: 8px; padding: 6px; min-width: 200px; font-size: 15px;
  background: #fff; border: 1px solid #ddd; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.vc-share-menu[hidden] { display: none; }
.vc-share-menu a, .vc-share-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; color: #222; text-decoration: none;
  border: 0; background: none; font: inherit; cursor: pointer; border-radius: 6px; box-sizing: border-box;
}
.vc-share-menu .si { flex: 0 0 auto; display: block; }
.vc-share-menu span { flex: 1 1 auto; }
.vc-share-menu a:hover, .vc-share-menu button:hover { background: #f4efe6; }
.vc-share-menu a:focus-visible, .vc-share-menu button:focus-visible { outline: 3px solid #f3d58a; outline-offset: 2px; }


.vc-share-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.45);
}
.vc-share-menu.is-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  margin: 0; min-width: 0; width: 100%; max-width: 100vw;
  max-height: 85vh; overflow: auto; box-sizing: border-box;
  border-radius: 16px 16px 0 0; border: 0;
  padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 28px rgba(0,0,0,.2);
  font-size: 16px;
}
.vc-share-menu.is-sheet a, .vc-share-menu.is-sheet button {
  min-height: 48px; padding: 12px 14px; font-size: 16px;
}
.vc-share-menu .share-close-btn {
  justify-content: center; font-weight: 700; margin-top: 4px;
}

.vc-toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 10; margin: 0;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 999px;
  background: #0b1f33; color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(11,31,51,.3); transition: opacity .2s, transform .2s;
}
.vc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.vc-toast:empty { display: none; }


/* Подсказка «Сохранить в контакты» на Android — в окне визитки, не короткий toast */
.vc-android-hint[hidden] { display: none !important; }
.vc-android-hint {
  margin-top: 14px; padding: 14px 14px 12px; border-radius: 14px;
  border: 1.5px solid rgba(224,180,90,.7); background: #fff; color: #14202b;
  box-shadow: 0 8px 24px rgba(11,31,51,.12);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}
.vc-android-hint-title {
  margin: 0 0 8px; color: #0b1f33;
  font: 800 16px/1.25 "Manrope", "Segoe UI", system-ui, sans-serif;
}
.vc-android-hint-text {
  margin: 0 0 12px; color: #14202b;
  font: 600 14px/1.5 "Manrope", "Segoe UI", system-ui, sans-serif;
}
.vc-android-hint-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vc-android-hint-actions .a {
  min-width: 0; min-height: 44px; border-radius: 14px; border: 1.5px solid #e4ddd2;
  background: #fff; color: #14202b; padding: 0 10px; cursor: pointer; white-space: normal; text-align: center;
  font: 700 14px/1.15 "Manrope", "Segoe UI", system-ui, sans-serif;
  display: flex; align-items: center; justify-content: center;
}
.vc-android-hint-actions .a.dark { background: #0b1f33; color: #fff; border-color: rgba(224,180,90,.55); }
.vc-android-hint-actions .a:hover { background: #f4efe6; }
.vc-android-hint-actions .a.dark:hover { background: #123047; }
.vc-android-hint-actions .a:focus-visible { outline: 3px solid #f3d58a; outline-offset: 2px; }

@media (max-width: 767px) {
  .vc, .vc-stage, .vc-actions { --w: 100%; }
  .vc { aspect-ratio: auto; min-height: 250px; padding: 18px 18px 40px; border-radius: 20px; }
  .vc h2 { font-size: 20px; margin-top: 12px; }
  .vc-offer { margin: 0 0 10px; padding: 7px 10px; font-size: 12px; border-radius: 8px; }
  .vc .rows { font-size: 13px; gap: 6px; }
  .vc .k { min-width: 64px; font-size: 10px; }
  .vc .foot { left: 18px; right: 18px; bottom: 14px; font-size: 11px; }
  .vc.back { grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; }
  .vc.back .qr { width: 104px; height: 104px; padding: 6px; }
  .vc-actions { gap: 8px; }
  .vc-actions .a { min-height: 44px; font-size: 13px; padding: 0 8px; }
  .vc-actions .a.amber { grid-column: 1 / -1; order: -1; }
  .vc-actions .a.vcf { grid-column: 1 / -1; }
  .vc-android-hint { margin-top: 12px; padding: 12px 12px 10px; position: sticky; bottom: 0; z-index: 4; }
  .vc-android-hint-title { font-size: 15px; }
  .vc-android-hint-text { font-size: 13px; margin-bottom: 10px; }
  .vc-android-hint-actions .a { font-size: 13px; }
}
@media (max-width: 480px) {
  .vc-modal { padding: 8px; }
  .vc-modal-box { padding: 16px 12px 14px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .vc-ready .vc-inner, .vc-modal, .vc-modal-box, 

.vc-toast { transition: none; }
}
@media print {
  .vc-ready .vc-inner { transform: none !important; display: block; }
  .vc-ready .vc { visibility: visible !important; transform: none !important; margin-bottom: 12px; }
  .vc-actions, .vc-copy, .vc-toast, .vc-close, .vc-android-hint { display: none !important; }
}
