/* Wizytówka cyfrowa (card.php): intro z ważką i nazwą fundacji, potem karta kontaktowa. Kolory i kroje jak na stronie. */
:root {
  --paper: #f1ece2; --paper-2: #e9e2d4; --card: #fbf8f2; --ink: #151a33; --muted: #585a68; --rule: #d4c9b5;
  --accent: #0d6f80; --teal: #1aa6b8; --navy: #1b1f4b; --rose: #a8677a;
  --serif: "Newsreader", Georgia, serif; --sans: "IBM Plex Sans", "Segoe UI", sans-serif; --mono: "IBM Plex Mono", Consolas, monospace; --brand: "Space Age", var(--sans);
}
* { box-sizing: border-box; }
html { scrollbar-width: none; }
html, body { margin: 0; min-height: 100%; }
body.vcard-page { font-family: var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }

/* ── intro ── */
.vc-intro { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: var(--paper); transition: opacity .7s ease, visibility .7s; }
.vc-intro.done { opacity: 0; visibility: hidden; }
.vc-intro__box { text-align: center; width: min(78vw, 340px); }
.vc-intro__df { width: 62%; margin: 0 auto 26px; display: block; animation: vc-flyin 1.1s cubic-bezier(.2,.9,.25,1) both; }
.vc-intro__df .w-up, .vc-intro__df .w-lo { transform-box: view-box; transform-origin: 100px 40px; animation: vc-flap .15s ease-in-out 7 alternate; animation-delay: .9s; }
.vc-intro__df .w-lo { transform-origin: 100px 43px; animation-delay: .95s; }
@keyframes vc-flyin { from { transform: translate(-40vw, 30vh) rotate(-18deg) scale(.4); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
@keyframes vc-flap { to { transform: scaleY(.28) scaleX(.97); } }
.vc-intro__word { font: 400 clamp(1rem, 5.4vw, 1.7rem)/1 var(--brand); letter-spacing: .06em; white-space: nowrap; color: var(--navy); }
.vc-intro__word span { opacity: 0; display: inline-block; transform: translateY(10px); animation: vc-letter .45s cubic-bezier(.25,1,.5,1) forwards; }
@keyframes vc-letter { to { opacity: 1; transform: none; } }
.vc-intro__tag { font: 500 .7rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-top: 12px; opacity: 0; animation: vc-letter .5s 1.75s forwards; }
.vc-intro__bar { height: 2px; background: var(--rule); margin: 26px auto 0; width: 70%; border-radius: 2px; overflow: hidden; }
.vc-intro__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--navy), var(--teal)); animation: vc-load 2.2s .3s cubic-bezier(.6,0,.3,1) forwards; }
@keyframes vc-load { to { width: 100%; } }

/* ── karta ── */
.vc { max-width: 460px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)); }
.vc-top { display: flex; align-items: center; justify-content: space-between; }
.vc-brand { display: flex; align-items: center; gap: 8px; font: 400 .8rem/1 var(--brand); letter-spacing: .07em; color: var(--navy); text-decoration: none; }
.vc-brand svg { width: 40px; }
.vc-lang { display: flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
.vc-lang button { font: 500 .72rem/1 var(--mono); letter-spacing: .1em; border: 0; background: none; color: var(--muted); padding: 8px 11px; border-radius: 999px; cursor: pointer; }
.vc-lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.vc-hero { text-align: center; margin: 30px 0 22px; }
.vc-photo { width: 132px; aspect-ratio: 1; border-radius: 50%; margin: 0 auto 18px; padding: 4px; background: conic-gradient(from 200deg, var(--rose), var(--teal), var(--navy), var(--rose)); }
.vc-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; border: 3px solid var(--paper); }
.vc-name { font: 500 2rem/1.05 var(--serif); margin: 0; }
.vc-role { margin: 8px 0 0; color: var(--muted); }
.vc-role em { font-family: var(--serif); color: var(--rose); font-size: 1.08em; }
.vc-org { font: 500 .7rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 10px 0 0; }
.vc-save { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; border-radius: 14px; background: var(--ink); color: #fff; font: 600 1rem/1 var(--sans); text-decoration: none; box-shadow: 0 12px 26px -14px rgba(21,26,51,.6); }
.vc-save svg { width: 20px; height: 20px; }
.vc-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 22px; }
.vc-quick--2 { grid-template-columns: repeat(2, 1fr); }
.vc-quick a { display: grid; place-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font: 500 .78rem/1 var(--sans); }
.vc-quick svg { width: 22px; height: 22px; color: var(--accent); }
.vc-list { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; }
.vc-row { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--rule); color: inherit; text-decoration: none; }
.vc-row:first-child { border-top: 0; }
.vc-row svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.vc-row small { display: block; font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.vc-row span { font-size: .98rem; overflow-wrap: anywhere; }
.vc-foot { text-align: center; color: var(--muted); font: italic 400 .95rem/1.5 var(--serif); margin-top: 22px; }
.vc-save:focus-visible, .vc-quick a:focus-visible, .vc-row:focus-visible, .vc-lang button:focus-visible, .vc-brand:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.vc-in > * { opacity: 0; transform: translateY(14px); }
.vc-in.show > * { animation: vc-up .6s cubic-bezier(.25,1,.5,1) forwards; }
.vc-in.show > :nth-child(2) { animation-delay: .08s; } .vc-in.show > :nth-child(3) { animation-delay: .16s; }
.vc-in.show > :nth-child(4) { animation-delay: .24s; } .vc-in.show > :nth-child(5) { animation-delay: .32s; } .vc-in.show > :nth-child(6) { animation-delay: .4s; }
@keyframes vc-up { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vc-intro { display: none; } .vc-in > * { opacity: 1; transform: none; animation: none !important; } }

/* ── fruwająca ważka (bez łapania: nie reaguje na dotyk, nie zasłania przycisków) ── */
.vc-fly { position: fixed; left: 0; top: 0; z-index: 5; width: 62px; height: 40px; pointer-events: none; opacity: 0; transition: opacity .8s ease; will-change: transform; filter: drop-shadow(0 6px 10px rgba(21,26,51,.12)); }
.vc-fly.on { opacity: 1; }
.vc-fly svg { width: 100%; height: 100%; overflow: visible; display: block; }
.vc-fly .wt, .vc-fly .wb { transform-box: view-box; transform-origin: 100px 41px; animation: vc-fly-flap .16s ease-in-out infinite; }
.vc-fly .wb { animation-delay: .05s; }
@keyframes vc-fly-flap { 50% { transform: scaleY(.3) scaleX(.97); } }
@media (prefers-reduced-motion: reduce) { .vc-fly { display: none; } }
.vc-quick--1 { grid-template-columns: 1fr; }
.vc-photo--logo { display: grid; place-items: center; }
.vc-photo--logo svg { width: 100%; height: 100%; padding: 26px 18px; border-radius: 50%; background: var(--paper); border: 3px solid var(--paper); box-sizing: border-box; }
.vc-top { gap: 10px; }
.vc-brand { margin-right: auto; }
.vc-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; font: 500 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.vc-back svg { width: 18px; height: 18px; }
.vc-back:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (max-width: 380px) { .vc-brand { font-size: 0; gap: 0; } }

/* ── przycisk „Kod QR" i kod na cały ekran (pokazujesz rozmówcy, on skanuje) ── */
.vc-quick--4 { grid-template-columns: repeat(4, 1fr); }
.vc-quick button { display: grid; place-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); font: 500 .78rem/1 var(--sans); cursor: pointer; }
.vc-quick button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (max-width: 360px) { .vc-quick--4 { grid-template-columns: repeat(2, 1fr); } }
.vc-qr { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px 18px; background: rgba(241, 236, 226, .97); animation: vc-up .35s cubic-bezier(.25,1,.5,1); }
.vc-qr[hidden] { display: none; }
.vc-qr__box { width: min(100%, 380px); text-align: center; }
.vc-qr__name { margin: 0 0 16px; font: 500 1.6rem/1.15 var(--serif); }
.vc-qr__code { width: 100%; aspect-ratio: 1; padding: 14px; border-radius: 22px; background: #fff; box-shadow: 0 24px 60px -30px rgba(21,26,51,.45); box-sizing: border-box; }
.vc-qr__code svg { display: block; width: 100%; height: 100%; }
.vc-qr__hint { margin: 18px 0 0; color: var(--muted); font-size: 1rem; }
.vc-qr__url { margin: 6px 0 0; font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.vc-qr__close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.vc-qr__close svg { width: 18px; height: 18px; }
.vc-qr__close:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
body.qr-open .vc-fly { opacity: 0; }
