/* LinkAdd – public card page + the shared business-card component (also used in the app). */

/* Bricolage Grotesque (SIL OFL 1.1), self-hosted so cards load fast and work offline in the app. */
@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
	src: url(fonts/bricolage-latin-ext.woff2) format("woff2-variations"), url(fonts/bricolage-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
	src: url(fonts/bricolage-latin.woff2) format("woff2-variations"), url(fonts/bricolage-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Themes ---------- */
.bc, .bc *, .la-page *, .la-page *::before, .la-page *::after { box-sizing: border-box; }

[data-theme] {
	--font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--radius-card: 18px;
	--radius: 14px;
}
[data-theme="midnight"] {
	--bg: #121735; --ring: rgba(143, 162, 255, .07);
	--ink: #e9ebff; --muted: #a3aad6; --line: rgba(233, 235, 255, .12);
	--row: rgba(255, 255, 255, .06); --row-hover: rgba(255, 255, 255, .11);
	--card: #1f2856; --card-ink: #f2f3ff; --card-muted: #aeb6e8; --card-edge: rgba(255, 255, 255, .14);
	--accent: #9aabff; --accent-ink: #10153a;
}
[data-theme="paper"] {
	--bg: #e7e8ea; --ring: rgba(39, 65, 214, .06);
	--ink: #1b1e27; --muted: #5d6272; --line: rgba(27, 30, 39, .12);
	--row: #ffffff; --row-hover: #f6f7fb;
	--card: #ffffff; --card-ink: #1b1e27; --card-muted: #666b7b; --card-edge: rgba(27, 30, 39, .1);
	--accent: #2741d6; --accent-ink: #ffffff;
}
[data-theme="ocean"] {
	--bg: #0b3a48; --ring: rgba(76, 224, 196, .08);
	--ink: #e3f6f2; --muted: #9cc8c0; --line: rgba(227, 246, 242, .14);
	--row: rgba(255, 255, 255, .07); --row-hover: rgba(255, 255, 255, .12);
	--card: #e3f4f0; --card-ink: #08313c; --card-muted: #44707a; --card-edge: rgba(8, 49, 60, .1);
	--accent: #4ce0c4; --accent-ink: #052a32;
}
[data-theme="sunset"] {
	--bg: #f3d9cf; --ring: rgba(178, 31, 96, .07);
	--ink: #2d1430; --muted: #77546d; --line: rgba(45, 20, 48, .13);
	--row: rgba(255, 255, 255, .6); --row-hover: rgba(255, 255, 255, .85);
	--card: #2d1430; --card-ink: #fbe9ef; --card-muted: #d7a9c0; --card-edge: rgba(255, 255, 255, .12);
	--accent: #b21f60; --accent-ink: #ffffff;
}
[data-theme="forest"] {
	--bg: #dfe7da; --ring: rgba(31, 74, 50, .07);
	--ink: #17301f; --muted: #50665a; --line: rgba(23, 48, 31, .13);
	--row: rgba(255, 255, 255, .65); --row-hover: #ffffff;
	--card: #1f3d2c; --card-ink: #edf4e8; --card-muted: #a9c3ae; --card-edge: rgba(255, 255, 255, .12);
	--accent: #2c6b46; --accent-ink: #ffffff;
}
[data-theme="mono"] {
	--bg: #f1f1f1; --ring: rgba(0, 0, 0, .045);
	--ink: #000000; --muted: #5c5c5c; --line: rgba(0, 0, 0, .12);
	--row: #ffffff; --row-hover: #f7f7f7;
	--card: #000000; --card-ink: #ffffff; --card-muted: #a8a8a8; --card-edge: rgba(255, 255, 255, .16);
	--accent: #000000; --accent-ink: #ffffff;
	--photo-bg: #ffffff; --photo-ink: #000000;
}

/* ---------- The business card (shared with the app preview) ---------- */
.bc {
	position: relative;
	aspect-ratio: 1.72 / 1;
	width: 100%;
	border-radius: var(--radius-card);
	background: var(--card);
	color: var(--card-ink);
	box-shadow: inset 0 0 0 1px var(--card-edge), 0 1px 2px rgba(0, 0, 0, .12), 0 18px 40px -18px rgba(0, 0, 0, .45);
	padding: 7% 7.5%;
	display: grid;
	grid-template-rows: auto 1fr auto;
	overflow: hidden;
	font-family: var(--font);
	container-type: inline-size;
}
.bc__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bc__photo {
	width: 21cqw; height: 21cqw; max-width: 84px; max-height: 84px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--photo-bg, var(--accent));
	color: var(--photo-ink, var(--accent-ink));
	display: grid; place-items: center;
	font-weight: 700; font-size: 7cqw; letter-spacing: -.02em;
	box-shadow: 0 0 0 2px var(--card-edge);
}
.bc__org { text-align: right; font-size: clamp(8px, 3.4cqw, 14px); color: var(--card-muted); line-height: 1.3; max-width: 60%; font-weight: 500; }
.bc__name {
	align-self: end;
	margin: 0;
	font-size: clamp(13px, 9.6cqw, 40px);
	font-weight: 700;
	letter-spacing: -.035em;
	line-height: .98;
	font-variation-settings: "opsz" 96;
	overflow-wrap: anywhere;
}
.bc__role { margin: 1.5cqw 0 0; font-size: clamp(9px, 3.9cqw, 16px); color: var(--card-muted); line-height: 1.3; }
.bc__bottom { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.bc__domain { font-size: clamp(8px, 3.1cqw, 13px); color: var(--card-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc__mark { width: 7.5cqw; height: 7.5cqw; max-width: 28px; max-height: 28px; color: var(--card-muted); flex: none; opacity: .8; }

/* ---------- Public page ---------- */
html { -webkit-text-size-adjust: 100%; }
body.la-page {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background-color: var(--bg);
	background-image: repeating-radial-gradient(circle at 50% 120px, transparent 0 26px, var(--ring) 26px 27px);
	background-size: 100% 520px;
	background-repeat: no-repeat;
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.la-wrap { max-width: 440px; margin: 0 auto; padding: 28px 16px 40px; }

.la-owner {
	display: flex; justify-content: space-between; align-items: center; gap: 10px;
	font-size: 14px; color: var(--muted);
	margin: -8px 0 18px;
}
.la-owner a { color: var(--ink); font-weight: 600; }

.la-stage { perspective: 900px; }
.la-stage .bc { animation: la-drop .7s cubic-bezier(.2, .9, .25, 1.05) both; transform-origin: 50% 0; }
@keyframes la-drop {
	from { transform: translateY(-14px) rotateX(18deg); opacity: 0; }
	to { transform: none; opacity: 1; }
}

.la-save {
	margin-top: 22px;
	display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%;
	min-height: 56px;
	border: 0; border-radius: var(--radius);
	background: var(--accent); color: var(--accent-ink);
	font: 650 17px/1.2 var(--font);
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 10px 24px -14px var(--accent);
}
.la-save .ic { width: 22px; height: 22px; }
.la-save:active { transform: translateY(1px); }

.la-quick { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 10px; }
.la-quick a, .la-quick button {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	min-height: 64px;
	border: 0; border-radius: var(--radius);
	background: var(--row); color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line);
	font: 550 13px/1.2 var(--font);
	text-decoration: none;
	cursor: pointer;
}
.la-quick a:hover, .la-quick button:hover { background: var(--row-hover); }
.la-quick .ic { width: 21px; height: 21px; }

.la-bio { margin: 26px 2px 0; color: var(--ink); font-size: 16px; line-height: 1.55; white-space: pre-line; }
.la-loc { display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; color: var(--muted); font-size: 14px; }
.la-loc .ic { width: 16px; height: 16px; }
.la-loc a { color: inherit; }
.la-loc + .la-loc { margin-top: 4px; }

.la-links { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 8px; }
.la-links a {
	display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 12px;
	padding: 12px 14px 12px 12px;
	border-radius: var(--radius);
	background: var(--row);
	box-shadow: inset 0 0 0 1px var(--line);
	color: var(--ink);
	text-decoration: none;
}
.la-links a:hover { background: var(--row-hover); }
.la-links .ico {
	width: 40px; height: 40px; border-radius: 11px;
	display: grid; place-items: center;
	background: var(--bg); color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line);
}
.la-links .ico .ic { width: 20px; height: 20px; }
.la-links b { display: block; font-weight: 600; font-size: 16px; line-height: 1.25; }
.la-links small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la-links span { min-width: 0; }

/* "Show QR code": fixed to the bottom of the screen, always in view (0.7.0). */
body.la-has-qrbar .la-wrap { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.la-qrbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
	display: flex; justify-content: center;
	padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
	background: linear-gradient(to top, var(--bg) 62%, transparent);
	pointer-events: none;
}
.la-qrbar button {
	pointer-events: auto;
	width: 100%; max-width: 408px;
	min-height: 62px;
	display: flex; align-items: center; justify-content: center; gap: 12px;
	border: 0; border-radius: 18px;
	background: var(--ink); color: var(--bg);
	font: 700 19px/1.2 var(--font);
	letter-spacing: -.01em;
	cursor: pointer;
	box-shadow: 0 0 0 4px var(--bg), 0 14px 34px -10px rgba(0, 0, 0, .55);
}
.la-qrbar button:active { transform: translateY(1px); }
.la-qrbar .ic { width: 28px; height: 28px; }

/* Note shown while adding a home-screen shortcut for this card. */
.la-add {
	position: relative;
	display: grid; gap: 4px;
	margin: -8px 0 20px;
	padding: 16px 52px 16px 18px;
	border-radius: var(--radius);
	background: #fff; color: #15182a;
	box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .06);
}
.la-add b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.la-add span { font-size: 15px; line-height: 1.45; }
.la-add small { font-size: 13px; color: #5a5f73; }
.la-add button {
	position: absolute; top: 8px; right: 8px;
	width: 40px; height: 40px; border: 0; border-radius: 50%;
	background: #eef0f6; color: #15182a; display: grid; place-items: center; cursor: pointer;
}
.la-add button .ic { width: 18px; height: 18px; }

.la-foot { margin-top: 34px; text-align: center; font-size: 13px; color: var(--muted); }
.la-foot a { color: var(--muted); }

/* "Make your own card" invite */
.la-promo {
	margin-top: 34px;
	padding: 20px 20px 18px;
	border-radius: var(--radius);
	background: var(--row);
	box-shadow: inset 0 0 0 1px var(--line);
	display: grid; gap: 4px;
}
.la-promo b, .la-after b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.la-promo span, .la-after span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.la-promo__btn {
	margin-top: 12px;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 18px;
	border-radius: 12px;
	background: var(--ink); color: var(--bg);
	font: 600 15px/1.2 var(--font);
	text-decoration: none;
}
.la-promo__btn .ic { width: 20px; height: 20px; }

/* Invite shown after "Save to contacts" */
.la-after {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
	display: flex; justify-content: center;
	padding: 0 12px calc(12px + env(safe-area-inset-bottom));
	pointer-events: none;
}
body.la-has-qrbar .la-after { bottom: calc(84px + env(safe-area-inset-bottom)); }
body.la-has-qrbar .la-toast { bottom: calc(104px + env(safe-area-inset-bottom)); }
.la-after[hidden] { display: none; }
.la-after__in {
	position: relative;
	width: 100%; max-width: 420px;
	display: grid; gap: 4px;
	padding: 18px 18px 16px;
	border-radius: 18px;
	background: #fff; color: #15182a;
	box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06);
	pointer-events: auto;
	animation: la-up .25s ease-out both;
}
.la-after span { color: #5a5f73; padding-right: 30px; }
.la-after .la-promo__btn { background: #15182a; color: #fff; }
.la-after__x {
	position: absolute; top: 8px; right: 8px;
	width: 40px; height: 40px; border: 0; border-radius: 50%;
	background: #eef0f6; color: #15182a; display: grid; place-items: center; cursor: pointer;
}
.la-after__x .ic { width: 18px; height: 18px; }

/* QR sheet */
.la-sheet { position: fixed; inset: 0; z-index: 10; display: none; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); }
.la-sheet.open { display: flex; }
.la-sheet__in {
	width: 100%; max-width: 440px;
	background: #fff; color: #15182a;
	border-radius: 22px 22px 0 0;
	padding: 22px 22px calc(26px + env(safe-area-inset-bottom));
	text-align: center;
	animation: la-up .25s ease-out both;
}
@keyframes la-up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.la-sheet h2 { margin: 0 0 4px; font: 700 20px/1.2 var(--font); letter-spacing: -.02em; }
.la-sheet p { margin: 0 0 16px; color: #5a5f73; font-size: 14px; }
.la-sheet .qr { width: min(72vw, 280px); margin: 0 auto; }
.la-sheet .qr svg { width: 100%; height: auto; display: block; }
.la-sheet button.close {
	margin-top: 18px; width: 100%; min-height: 48px;
	border: 0; border-radius: 12px; background: #eef0f6; color: #15182a;
	font: 600 15px var(--font); cursor: pointer;
}

.la-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 20;
	transform: translate(-50%, 20px); opacity: 0;
	background: #15182a; color: #fff; padding: 10px 16px; border-radius: 999px;
	font: 500 14px var(--font);
	transition: .2s ease; pointer-events: none;
}
.la-toast.show { transform: translate(-50%, 0); opacity: 1; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	.la-stage .bc, .la-sheet__in, .la-after__in { animation: none; }
	.la-toast { transition: none; }
}
