/* Digital business card — theme v2.5.0. Brand: navy #0e1f3d, blue #0275d3, white; Sora + Inter. */
:root {
    --c-blue: #0275d3;
    --c-blue-dark: #0155a0;
    --c-blue-light: #eff6ff;
    --c-navy: #0e1f3d;
    --c-slate: #334155;
    --c-muted: #64748b;
    --c-line: #e2e8f0;
    --c-bg: #f1f5f9;
}

html { -webkit-text-size-adjust: 100%; }
body.nsd-card-page {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-navy);
    font: 400 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
.nsd-card-page *, .nsd-card-page *::before, .nsd-card-page *::after { box-sizing: border-box; }
.nsd-card-page .ic { width: 22px; height: 22px; flex: none; }
.nsd-card-page a { color: inherit; text-decoration: none; }
.nsd-card-page :focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; border-radius: 10px; }

.card {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 520px) {
    .card { margin: 32px auto; min-height: 0; border-radius: 24px; overflow: hidden; box-shadow: 0 10px 40px rgba(14, 31, 61, .12); }
}

/* Top band */
.card__top {
    position: relative;
    height: 150px;
    background: var(--c-navy);
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 18px 0;
}
.card__stair { position: absolute; right: -40px; bottom: -70px; width: 270px; fill: var(--c-blue); opacity: .16; }
.nsd-card-page .card__brand { position: relative; display: flex; align-items: center; gap: 10px; color: #fff; font: 700 15px/1 Sora, Inter, sans-serif; }
.card__brand svg { width: 30px; height: 23px; fill: var(--c-blue); }
.card__share {
    position: relative; width: 42px; height: 42px; border-radius: 50%;
    border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.card__share:hover { background: rgba(255,255,255,.22); }

/* Identity */
.card__id { text-align: center; padding: 0 24px; margin-top: -66px; position: relative; }
.card__photo {
    width: 132px; height: 132px; margin: 0 auto 14px; border-radius: 50%;
    border: 6px solid var(--c-blue); background: var(--c-navy); overflow: hidden;
    display: grid; place-items: center; box-shadow: 0 0 0 4px #fff;
}
.card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__photo span { color: #fff; font: 800 44px/1 Sora, sans-serif; letter-spacing: .02em; }
.card__name { font: 800 30px/1.15 Sora, Inter, sans-serif; margin: 0 0 4px; letter-spacing: -.01em; }
.card__role { font-weight: 600; color: var(--c-slate); margin: 0; }
.card__desc { color: var(--c-blue); font-weight: 600; font-size: 14px; margin: 2px 0 0; }
.card__bio { color: var(--c-slate); margin: 14px auto 0; max-width: 34ch; }
.card__loc { color: var(--c-muted); font-size: 14px; margin: 8px 0 0; }

/* Primary actions */
.card__primary { padding: 22px 20px 6px; }
.btn-save, .btn-send, .btn-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 56px; padding: 14px 20px; border: 0; border-radius: 14px;
    background: var(--c-blue); color: #fff !important; cursor: pointer;
    font: 700 17px/1.2 Inter, sans-serif; transition: background .15s, transform .05s;
}
.btn-save:hover, .btn-send:hover, .btn-cta:hover { background: var(--c-blue-dark); }
.btn-save:active, .btn-send:active, .btn-cta:active { transform: scale(.99); }
.quick { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 12px; }
.quick a {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px;
    border-radius: 14px; background: var(--c-blue-light); color: var(--c-blue);
    font-size: 13px; font-weight: 600;
}
.quick a:hover { background: #dbeafe; }
.quick span { color: var(--c-navy); }

/* Details */
.card__details { margin: 16px 20px 0; border: 1px solid var(--c-line); border-radius: 16px; }
.card__details a { display: block; padding: 12px 16px; font-weight: 600; word-break: break-word; }
.card__details a + a { border-top: 1px solid var(--c-line); }
.card__details small { display: block; color: var(--c-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* Links */
.card__links { margin: 16px 20px 0; display: grid; gap: 10px; }
.card__links a {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--c-line); border-radius: 14px; font-weight: 600;
}
.card__links a .ic:first-child { color: var(--c-blue); }
.card__links a .ic:last-child { margin-left: auto; color: var(--c-muted); width: 18px; height: 18px; }
.card__links a:hover { border-color: var(--c-blue); }

/* Swap details */
.card__swap { margin: 16px 20px 0; }
.swap-toggle {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px;
    border: 2px dashed #bfdbfe; border-radius: 16px; background: #fff; color: var(--c-navy);
    text-align: left; cursor: pointer; font: inherit;
}
.swap-toggle .ic { color: var(--c-blue); width: 26px; height: 26px; }
.swap-toggle strong { display: block; font: 700 16px/1.3 Sora, Inter, sans-serif; }
.swap-toggle small { display: block; color: var(--c-muted); font-size: 14px; }
.swap-toggle[aria-expanded="true"] { border-style: solid; border-color: var(--c-blue); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.swap-form { border: 2px solid var(--c-blue); border-top: 0; border-radius: 0 0 16px 16px; padding: 6px 16px 16px; display: grid; gap: 12px; }
.swap-form[hidden] { display: none; }
.swap-form label span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.swap-form input, .swap-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
    font: 16px/1.4 Inter, sans-serif; color: var(--c-navy); background: #fff;
}
.swap-form input:focus, .swap-form textarea:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(2,117,211,.18); }
.swap-small { font-size: 13px; color: var(--c-muted); margin: 0; }
.swap-small a { color: var(--c-blue); text-decoration: underline; }
.swap-err { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: 14px; }
.swap-done { padding: 18px; border-radius: 16px; background: var(--c-blue-light); text-align: center; }
.swap-done h2 { font: 700 18px/1.3 Sora, Inter, sans-serif; margin: 0 0 4px; }
.swap-done p { margin: 0; color: var(--c-slate); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* CTA */
.card__cta { margin: 24px 20px 0; padding: 22px 20px; border-radius: 18px; background: var(--c-navy); color: #fff; text-align: center; }
.card__cta p { margin: 0 0 12px; font: 700 17px/1.35 Sora, Inter, sans-serif; }

/* Owner tools (logged in only) */
.card__owner { margin: 16px 20px 0; padding: 12px; border-radius: 14px; background: #fffbeb; border: 1px solid #fde68a; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.card__owner p { width: 100%; margin: 0; color: #92400e; font-size: 12px; }
.card__owner a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid #fde68a; font-weight: 600; }
.card__owner .ic { width: 18px; height: 18px; }

.card__foot { text-align: center; padding: 24px 20px 28px; font-size: 14px; color: var(--c-muted); }
.card__foot a { color: var(--c-muted); }

/* Share sheet */
.sheet { position: fixed; inset: 0; z-index: 99999; background: rgba(14,31,61,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet__panel {
    position: relative; width: 100%; max-width: 460px; background: #fff; border-radius: 22px 22px 0 0;
    padding: 28px 24px calc(24px + env(safe-area-inset-bottom)); text-align: center;
}
@media (min-width: 520px) { .sheet { align-items: center; } .sheet__panel { border-radius: 22px; } }
.sheet__panel h2 { font: 700 20px/1.3 Sora, Inter, sans-serif; margin: 0 0 16px; }
.sheet__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--c-bg); color: var(--c-navy); display: grid; place-items: center; cursor: pointer; }
.sheet__qr { width: 252px; max-width: 72vw; margin: 0 auto; padding: 20px; border: 1px solid var(--c-line); border-radius: 16px; }
.sheet__qr svg { display: block; width: 100%; height: auto; }
.sheet__url { margin: 12px 0 18px; font-weight: 600; color: var(--c-slate); }
.sheet__actions { display: grid; gap: 10px; }
.btn-ghost { min-height: 50px; border-radius: 14px; border: 1px solid var(--c-line); background: #fff; font: 600 16px Inter, sans-serif; color: var(--c-navy); cursor: pointer; }

@media (prefers-reduced-motion: reduce) { .nsd-card-page * { transition: none !important; } }
