/* =========================================================
   tabs (d2): wallet-pass stack. Off-white passes on cool grey,
   gold accent. Radius: 24px passes, 14px buttons, pill chips.
   ========================================================= */

@font-face {
	font-family: "Ploni";
	src: url("../../fonts/ploni-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Ploni";
	src: url("../../fonts/ploni-500.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: "Ploni";
	src: url("../../fonts/ploni-600.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "Ploni";
	src: url("../../fonts/ploni-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

:root {
	--ff: "Ploni", system-ui, sans-serif;
}

.d2 {
	--page: #e3e6ec;
	--pass: #fdfdfd;
	--ink: #0f1e36;
	--muted: #5b6578;
	--accent: #c59a4a;
	--on-accent: #0f1e36;
	--line: #e1e4ea;
	--soft: #eef0f4;
	--qr-dark: #121317;
	--qr-light: #fff;
	--r-from: translateY(26px) scale(.97);
	--hero-base: .3s;
	font-family: var(--ff);
	background: var(--page);
	color: var(--ink);
	padding: 14px 14px 30px;
}

.d2[data-scheme="2"] {
	--page: #e4eae2;
	--pass: #fdfdfb;
	--ink: #1f2b22;
	--muted: #5f6b5b;
	--accent: #4c7a46;
	--on-accent: #fff;
	--line: #dce3d9;
	--soft: #eef2ec;
}

.d2[data-scheme="3"] {
	--page: #121316;
	--pass: #1c1e22;
	--ink: #f3f4f6;
	--muted: #9ca1ab;
	--accent: #e0b25c;
	--on-accent: #121316;
	--line: #2c2f35;
	--soft: #262930;
}

.d2[data-scheme="4"] {
	--page: #e5e8eb;
	--pass: #fff;
	--ink: #22282f;
	--muted: #636d78;
	--accent: #b8492f;
	--on-accent: #fff;
	--line: #dfe3e7;
	--soft: #f0f2f4;
}

.d2 .mono {
	font-variant-numeric: tabular-nums;
	letter-spacing: .02em;
}

.d2-pass {
	position: relative;
	background: var(--pass);
	border-radius: 24px;
	margin-bottom: 14px;
	box-shadow: 0 1px 0 rgba(18, 19, 23, .04), 0 26px 40px -30px rgba(18, 19, 23, .4);
}

/* Hero: photo strip with avatar + name on it */
.d2-strip {
	position: relative;
	height: clamp(180px, calc(100dvh - 520px), 250px);
	border-radius: 24px 24px 0 0;
	overflow: hidden;
	color: #fff;
	background: #121317;
	display: flex;
	align-items: flex-end;
	padding: 16px;
}

.d2-strip > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.d2-strip::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(18, 19, 23, 0) 25%, rgba(18, 19, 23, .82));
}

.d2-who {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 14px;
}

.d2-av {
	width: 72px;
	height: 72px;
	flex: none;
	border-radius: 18px;
	overflow: hidden;
	border: 3px solid #fff;
	background: #d9dade;
}

.d2-av img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.d2-who h1 {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
}

.d2-who p {
	font-size: 15px;
	opacity: .9;
	margin-top: 3px;
}

.d2-lbl {
	display: block;
	font-size: 12.5px;
	color: var(--muted);
	font-weight: 500;
}

.d2-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 14px;
	padding: 20px 18px 4px;
}

.d2-f.w {
	grid-column: 1 / -1;
}

.d2-f .v {
	display: block;
	font-size: 16px;
	font-weight: 600;
	margin-top: 3px;
	overflow-wrap: anywhere;
}

.d2-f a.v {
	transition: color .2s;
}

.d2-f a.v:hover {
	color: color-mix(in srgb, var(--accent) 75%, var(--ink));
}

.d2-actions {
	--hero-base: .5s;
	display: flex;
	gap: 8px;
	padding: 18px;
}

.d2-add {
	flex: 1;
	height: 56px;
	border-radius: 14px;
	background: var(--ink);
	color: var(--pass);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-weight: 600;
	font-size: 16px;
	white-space: nowrap;
	transition: transform .2s var(--ease);
}

.d2-add i {
	font-size: 21px;
	color: var(--accent);
}

.d2-sq {
	width: 56px;
	height: 56px;
	flex: none;
	border-radius: 14px;
	background: var(--soft);
	display: grid;
	place-items: center;
	font-size: 23px;
	transition: transform .2s var(--ease);
}

.d2-sq.wa {
	background: #e3f6ea;
	color: #127a3a;
}

.d2-add:active,
.d2-sq:active {
	transform: scale(.96);
}

.d2-perf {
	position: relative;
	height: 24px;
}

/* Ticket notches on both edges */
.d2-perf::before {
	content: "";
	position: absolute;
	top: 0;
	right: -12px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--page);
}

.d2-perf::after {
	content: "";
	position: absolute;
	top: 0;
	left: -12px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--page);
}

.d2-perf span {
	position: absolute;
	left: 20px;
	right: 20px;
	top: 11px;
	border-top: 2px dashed var(--line);
}

.d2-perf--hidden {
	visibility: hidden;
}

.d2-socials {
	--hero-base: .65s;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 18px 18px;
}

.d2-socials span {
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
	margin-inline-end: auto;
}

.d2-socials a {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	border: 1px solid var(--line);
	font-size: 20px;
	transition: background .2s;
}

.d2-socials a:hover {
	background: var(--soft);
}

.d2-body {
	padding: 20px 18px;
}

.d2-body h2 {
	font-size: 19px;
	font-weight: 700;
}

.d2-body > p {
	font-size: 16px;
	line-height: 1.65;
	color: var(--muted);
	margin-top: 8px;
}

.d2-facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 16px;
}

.d2-stack-sec {
	padding: 8px 2px 20px;
}

.d2-sec-h {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 6px;
	margin-bottom: 16px;
}

.d2-sec-h h2 {
	font-size: 19px;
	font-weight: 700;
}

.d2-next {
	height: 40px;
	padding: 0 16px;
	border-radius: 999px;
	background: var(--pass);
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.d2-stack {
	position: relative;
	height: 400px;
	touch-action: pan-y;
	user-select: none;
}

.d2-card {
	position: absolute;
	inset: 0 12px 36px;
	border-radius: 24px;
	overflow: hidden;
	background: #cfd0d5;
	box-shadow: 0 22px 40px -24px rgba(18, 19, 23, .65);
	transition: transform .5s var(--ease), opacity .4s;
	cursor: grab;
}

.d2-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.d2-card figcaption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 44px 16px 14px;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	background: linear-gradient(transparent, rgba(10, 10, 12, .7));
}

.d2 .gr {
	--gr-text: var(--ink);
	--gr-sub: var(--muted);
	--gr-btn: var(--soft);
	--gr-dot: color-mix(in srgb, var(--ink) 18%, transparent);
	--gr-accent: var(--accent);
	--gr-card: var(--soft);
	--gr-ink: var(--ink);
	--gr-muted: var(--muted);
	--gr-line: transparent;
	--gr-r: 18px;
	--gr-pad: 18px;
}

.d2-form .form-body > h2 + p {
	font-size: 16px;
	color: var(--muted);
	margin: 6px 0 18px;
}

.d2-form label {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--muted);
}

.d2-form input:not([type="checkbox"]),
.d2-form textarea {
	width: 100%;
	border: 1.5px solid transparent;
	background: var(--soft);
	border-radius: 14px;
	padding: 13px 14px;
	font-size: 16px;
	outline: none;
	resize: vertical;
	transition: border-color .2s, background .2s;
}

.d2-form input:focus,
.d2-form textarea:focus {
	border-color: var(--ink);
	background: var(--pass);
}

.d2-form .bad input,
.d2-form .bad textarea {
	border-color: #c62f14;
}

.d2-form .err,
.d2-form .form-error {
	color: #b52a10;
}

.d2-form .chk input {
	accent-color: var(--ink);
}

.d2-form .chk label {
	color: var(--ink);
}

.d2-form .form-done i {
	color: #127a3a;
}

.d2-submit {
	width: 100%;
	height: 56px;
	border-radius: 14px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: transform .2s var(--ease);
}

.d2-submit:active {
	transform: scale(.98);
}

.d2-stub {
	display: grid;
	grid-template-columns: 132px 1fr;
	gap: 16px;
	align-items: center;
	padding: 18px;
}

.d2-stub--top {
	padding-top: 0;
}

.d2-stub .qr-box {
	background: #fff;
	border-radius: 14px;
	padding: 8px;
	border: 1px solid var(--line);
}

.d2-stub strong {
	font-size: 17px;
	display: block;
}

.d2-stub p {
	font-size: 14px;
	color: var(--muted);
	margin-top: 4px;
	line-height: 1.5;
}

.d2-legal {
	padding: 4px 18px 18px;
	font-size: 12.5px;
	line-height: 1.7;
	color: var(--muted);
}

.d2-legal nav {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.d2-legal nav button {
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: var(--ink);
}

.d2.on .d2-pass:first-child {
	animation: d2in .7s var(--ease) both;
}

.d2.on .d2-strip > img {
	animation: heroZoom 1.4s var(--ease-out) both;
}

.d2.on .d2-who {
	animation: heroUp .7s var(--ease-out) both .2s;
}

@keyframes d2in {
	from {
		opacity: 0;
		transform: translateY(30px) scale(.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}
